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

# Generate TTS Audio

> Convert text to speech audio using the session's configured TTS voice.

## Request Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `text` | Yes | The text to convert to speech |
| `locale` | No | Language/locale for text normalization (e.g., `ko`, `en`) |

## Response

Returns base64-encoded audio data in the configured format.

## Example

Select **"TTSRequest"** from the **Examples** dropdown to see the request format.




## OpenAPI

````yaml /specs/openapi-interactive.json post /api/v1/session/{session_id}/tts/
openapi: 3.0.3
info:
  title: Perso Interactive API
  version: 0.0.0
servers:
  - url: https://platform.perso.ai
security: []
tags:
  - name: Embed
paths:
  /api/v1/session/{session_id}/tts/:
    post:
      tags:
        - Session Operations
      summary: Generate TTS Audio
      description: >
        Convert text to speech audio using the session's configured TTS voice.


        ## Request Parameters


        | Parameter | Required | Description |

        |-----------|----------|-------------|

        | `text` | Yes | The text to convert to speech |

        | `locale` | No | Language/locale for text normalization (e.g., `ko`,
        `en`) |


        ## Response


        Returns base64-encoded audio data in the configured format.


        ## Example


        Select **"TTSRequest"** from the **Examples** dropdown to see the
        request format.
      operationId: v1_session_tts_create
      parameters:
        - in: path
          name: session_id
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TTSRequestRequest'
            examples:
              TTSRequest:
                value:
                  text: Hello, this is Perso Live speaking.
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/TTSRequestRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/TTSRequestRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TTSResponse'
          description: ''
        '400':
          description: Bad Request - Invalid input data or parameters.
        '401':
          description: Unauthorized - Invalid or missing authentication credentials.
        '403':
          description: Forbidden - You do not have permission to perform this action.
        '404':
          description: Not Found - The requested resource could not be found.
        '405':
          description: Method Not Allowed - Invalid HTTP method
        '406':
          description: Not Acceptable - Invalid request accept headers
        '415':
          description: Unsupported Media Type - Invalid content type
        '500':
          description: Internal Server Error - An unexpected error occurred.
      security:
        - {}
components:
  schemas:
    TTSRequestRequest:
      type: object
      properties:
        text:
          type: string
          minLength: 1
          description: Text to convert to speech using the session's configured voice.
        locale:
          type: string
          minLength: 1
          description: Optional locale (e.g. `en-US`, `ko-KR`) for text normalization.
        output_format:
          allOf:
            - $ref: '#/components/schemas/TTSRequestOutputFormatEnum'
          default: mp3
          description: |-
            Audio format to return: `mp3`, `wav`, or `pcm`.

            * `pcm_24000` - pcm_24000
            * `pcm_44100` - pcm_44100
            * `wav_24000` - wav_24000
            * `wav_44100` - wav_44100
            * `mp3_44100` - mp3_44100
            * `mp3` - mp3
            * `wav` - wav
            * `pcm` - pcm
      required:
        - text
    TTSResponse:
      type: object
      properties:
        audio:
          type: string
        locale:
          type: string
        normalized_text:
          type: string
      required:
        - audio
        - locale
        - normalized_text
    TTSRequestOutputFormatEnum:
      enum:
        - pcm_24000
        - pcm_44100
        - wav_24000
        - wav_44100
        - mp3_44100
        - mp3
        - wav
        - pcm
      type: string
      description: |-
        * `pcm_24000` - pcm_24000
        * `pcm_44100` - pcm_44100
        * `wav_24000` - wav_24000
        * `wav_44100` - wav_44100
        * `mp3_44100` - mp3_44100
        * `mp3` - mp3
        * `wav` - wav
        * `pcm` - pcm

````