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

# Text to Speech

> Convert text to speech using our advanced AI models



## OpenAPI

````yaml https://mahatts-assets-new.s3.ap-south-1.amazonaws.com/openapi.json post /tts
openapi: 3.0.0
info:
  title: Dubverse TTS API
  version: 1.0.0
servers:
  - url: https://audio.dubverse.ai/api
security: []
paths:
  /tts:
    post:
      summary: Text to Speech
      description: Convert text to speech using our advanced AI models
      operationId: textToSpeech
      parameters:
        - in: header
          name: X-API-KEY
          schema:
            type: string
          required: true
          description: API key for authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                text:
                  type: string
                  description: The input text you want to convert to speech.
                  example: >-
                    Welcome to Dubverse AI. Convert your text to lifelike speech
                    with our advanced AI models.
                speaker_no:
                  type: integer
                  description: The ID of the speaker voice.
                  example: 1190
                config:
                  type: object
                  properties:
                    use_streaming_response:
                      type: boolean
                      description: >-
                        Set to true for streamed audio, false for a complete
                        audio file response.
                      default: false
                    sample_rate:
                      type: number
                      description: >-
                        The sample rate of the output audio in Hz. Only
                        supported by 'neo.one' speakers.
                      minimum: 8000
                      maximum: 48000
                      default: 22050
                    instructions:
                      type: string
                      description: >-
                        Optional instructions to guide voice generation. Only
                        supported for 'Mermish' speakers.
                  additionalProperties: false
                callback_url:
                  type: string
                  description: >-
                    URL to receive the API response if different from the
                    origin.
              required:
                - text
                - speaker_no
              additionalProperties: false
      responses:
        '200':
          description: Successful response
          content:
            audio/wav:
              schema:
                type: string
                format: binary

````