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

# Text-to-Speech (TTS)

> Convert text into natural-sounding speech using a selected AI voice model.



## OpenAPI

````yaml POST /v1/audio/speech-synthesis
openapi: 3.0.1
info:
  title: FineVoice API
  description: >-
    This is the documentation for the FineVoice API. If you have any questions
    or need assistance, please contact support@finevoice.ai.
  version: v1
servers:
  - url: https://apis.finevoice.ai
    description: FineVoice API Gateway
security:
  - BearerAuth: []
paths:
  /v1/audio/speech-synthesis:
    post:
      tags:
        - Audio
      summary: Text to Speech
      description: >-
        Convert text into natural-sounding speech using a selected AI voice
        model.
      operationId: SpeechSynthesis
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TextToSpeechRequest'
      responses:
        '200':
          description: >-
            Task accepted. Returns a taskId for async polling or the result URL
            directly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AudioTaskResponse'
        '401':
          description: Unauthorized — invalid or missing API key.
        '422':
          description: Validation error — check request body fields.
components:
  schemas:
    TextToSpeechRequest:
      type: object
      description: The text-to-speech request payload.
      properties:
        voice:
          type: string
          description: >-
            The target voice model name. Retrieve available voices from the List
            AI Voices API.
          example: james
        text:
          type: string
          description: >-
            The text content to synthesize. Supports emotion tags such as
            `[happy]`, `[sad]`, `[breathe]`.
          example: '[happy] Hello! Welcome to FineVoice.'
    AudioTaskResponse:
      type: object
      description: Standard response for audio processing tasks.
      properties:
        status:
          type: integer
          format: int32
          description: HTTP-style status code (200 for success, 202 for in-progress).
        url:
          type: string
          description: Download URL of the generated audio file (available when completed).
        taskId:
          type: string
          description: Task identifier for async polling. Use with GET /v1/task/{task_id}.
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        error:
          $ref: '#/components/schemas/ApiError'
        urls:
          type: array
          items:
            type: string
          description: Multiple output URLs (e.g. for separation stems).
        service:
          type: string
        port:
          type: string
        timestamp:
          type: string
    ApiError:
      type: object
      properties:
        code:
          type: string
          description: Error code.
        message:
          type: string
          description: Error message.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Bearer token (API key). Format: `Bearer {your_api_key}`'

````