> ## Documentation Index
> Fetch the complete documentation index at: https://docs.egma.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview persona audio

> Generate one short sample with the same capability and speech-rendering path used by voice simulations. This does not create a test or run.



## OpenAPI

````yaml openapi.json POST /v1/persona-preview
openapi: 3.1.0
info:
  title: Egma Platform API
  version: 1.0.0
  description: >-
    The customer-facing HTTP interface used by Egma's web app, CLI, and outside
    clients.
servers:
  - url: https://app.egma.ai
security: []
paths:
  /v1/persona-preview:
    post:
      tags:
        - Personas
      summary: Preview persona audio
      description: >-
        Generate one short sample with the same capability and speech-rendering
        path used by voice simulations. This does not create a test or run.
      operationId: previewPersona
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                projectId:
                  type: string
                  minLength: 1
                models:
                  type: object
                  description: >-
                    The complete language, speech recognition, and speech
                    synthesis selections. Read /v1/persona-form for available
                    choices and recommendations.
                  properties:
                    llm:
                      type: object
                      properties:
                        provider:
                          type: string
                        model:
                          type: string
                      required:
                        - provider
                        - model
                      additionalProperties: false
                    stt:
                      type: object
                      properties:
                        provider:
                          type: string
                        model:
                          type: string
                      required:
                        - provider
                        - model
                      additionalProperties: false
                    tts:
                      type: object
                      properties:
                        provider:
                          type: string
                        model:
                          type: string
                        voiceId:
                          type: string
                          description: >-
                            A voice identifier supported by the selected
                            text-to-speech provider.
                        speed:
                          type: number
                          description: >-
                            Provider-supported speech rate. Read the selected
                            combination's capability range.
                      required:
                        - provider
                        - model
                        - voiceId
                        - speed
                      additionalProperties: false
                  required:
                    - llm
                    - stt
                    - tts
                  additionalProperties: false
                controls:
                  type: object
                  properties:
                    language:
                      type: string
                      minLength: 1
                    emotion:
                      type: string
                      enum:
                        - neutral
                        - happy
                        - angry
                        - frustrated
                        - sad
                        - anxious
                    accent:
                      type: string
                      minLength: 1
                    speechVolume:
                      type: number
                      minimum: 0.5
                      maximum: 1.5
                    backgroundSoundId:
                      type: string
                      enum:
                        - none
                        - office-v1
                        - cafe-v1
                        - street-traffic-v1
                        - crowd-talking-v1
                        - inside-car-v1
                        - home-tv-v1
                        - wind-v1
                        - rain-v1
                    backgroundVolume:
                      type: number
                      minimum: 0.015848931924611134
                      maximum: 0.251188643150958
                    interruptionLevel:
                      type: string
                      enum:
                        - 'off'
                        - occasional
                        - frequent
                  required:
                    - language
                    - emotion
                    - accent
                    - speechVolume
                    - backgroundSoundId
                    - backgroundVolume
                    - interruptionLevel
                  additionalProperties: false
                voiceAccessProof:
                  type: string
                  description: A prior short-lived proof for an existing provider voice ID.
              required:
                - models
                - controls
              additionalProperties: false
      responses:
        '200':
          description: Generated Preview audio and any new voice-access proof.
          content:
            application/json:
              schema:
                type: object
                properties:
                  audioBase64:
                    type: string
                    contentEncoding: base64
                  contentType:
                    type: string
                  voiceAccessProof:
                    type: string
                  expiresAt:
                    anyOf:
                      - type: string
                        format: date-time
                      - type: 'null'
                  interruptionNotice:
                    type: string
                required:
                  - audioBase64
                  - contentType
                  - expiresAt
                  - interruptionNotice
                additionalProperties: false
        '400':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '401':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '403':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '404':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '409':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '422':
          description: The request was refused.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
        '429':
          description: The request rate limit was reached.
          headers:
            Retry-After:
              description: Seconds to wait before trying again.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Refusal'
      security:
        - bearerAuth: []
        - sessionCookie: []
components:
  schemas:
    Refusal:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        details:
          type: object
          additionalProperties: true
      required:
        - error
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Egma API key.
    sessionCookie:
      type: apiKey
      in: cookie
      name: egma.session_token
      description: >-
        The browser session cookie issued by Egma. HTTPS deployments add the
        standard __Secure- prefix.

````