v2

latestOpenAPI 3.1.02026-07-2628105122.0 KB
textToSpeech

Text to Speech

Convert text into spoken audio. The output is a base64-encoded audio string that must be decoded before use.

Available Models:

  • bulbul:v3: Latest model with improved quality, 30+ voices, and temperature control
  • bulbul:v2: Legacy model with pitch and loudness controls

Important Notes for bulbul:v3:

  • Pitch and loudness parameters are NOT supported
  • Pace range: 0.5 to 2.0
  • Preprocessing is automatically enabled
  • Default sample rate is 24000 Hz
  • Supports sample rates: 8000, 16000, 22050, 24000 Hz (REST API also supports 32000, 44100, 48000 Hz)
post/text-to-speech

Headers

api-subscription-keystring required

Request body

textstring required

The text(s) to be converted into speech.

Features:

  • Supports code-mixed text (English and Indic languages)

Model-specific limits:

  • bulbul:v3: Max 2500 characters
  • bulbul:v2: Max 1500 characters

Important Note:

  • For numbers larger than 4 digits, use commas (e.g., '10,000' instead of '10000')
  • This ensures proper pronunciation as a whole number
target_language_code'bn-IN' | 'en-IN' | 'gu-IN' | 'hi-IN' | 'kn-IN' | 'ml-IN' | 'mr-IN' | 'od-IN' | 'pa-IN' | 'ta-IN' | 'te-IN' required
speaker'anushka' | 'abhilash' | 'manisha' | 'vidya' | 'arya' | 'karun' | 'hitesh' | 'aditya' | 'ritu' | 'priya' | 'neha' | 'rahul' | 'pooja' | 'rohan' | 'simran' | 'kavya' | 'amit' | 'dev' | 'ishita' | 'shreya' | 'ratan' | 'varun' | 'manan' | 'sumit' | 'roopa' | 'kabir' | 'aayan' | 'shubh' | 'ashutosh' | 'advait' | 'anand' | 'tanya' | 'tarun' | 'sunny' | 'mani' | 'gokul' | 'vijay' | 'shruti' | 'suhani' | 'mohit' | 'kavitha' | 'rehan' | 'soham' | 'rupali'
pitchnumber double nullable

Controls the pitch of the audio. Lower values result in a deeper voice, while higher values make it sharper. The suitable range is between -0.75 and 0.75. Default is 0.0.

Note: This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3.

pacenumber double nullable

Controls the speed of the audio. Lower values result in slower speech, while higher values make it faster. Default is 1.0.

Model-specific ranges:

  • bulbul:v3: 0.5 to 2.0
  • bulbul:v2: 0.3 to 3.0
loudnessnumber double nullable

Controls the loudness of the audio. Lower values result in quieter audio, while higher values make it louder. The suitable range is between 0.3 and 3.0. Default is 1.0.

Note: This parameter is only supported for bulbul:v2. It is NOT supported for bulbul:v3.

speech_sample_rate'8000' | '16000' | '22050' | '24000' | '32000' | '44100' | '48000'
enable_preprocessingboolean

Controls whether normalization of English words and numeric entities (e.g., numbers, dates) is performed. Set to true for better handling of mixed-language text.

Model-specific behavior:

  • bulbul:v3: Not Supported
  • bulbul:v2: Default is false
model'bulbul:v2' | 'bulbul:v3'
output_audio_codec'mp3' | 'linear16' | 'mulaw' | 'alaw' | 'opus' | 'flac' | 'aac' | 'wav'

Audio codec options for the non-streaming /text-to-speech endpoint

temperaturenumber double nullable

Temperature controls how much randomness and expressiveness the TTS model uses while generating speech.

Lower values produce more stable and consistent output, while higher values sound more expressive but may introduce artifacts or errors. The suitable range is between 0.01 and 2.0. Default is 0.6.

Note: This parameter is only supported for bulbul:v3. It has no effect on bulbul:v2.

dict_idstring nullable

The ID of a pronunciation dictionary to apply during synthesis. When provided, matching words in the input text will be replaced with their custom pronunciations before generating speech.

Create and manage dictionaries via the Pronunciation Dictionary API. Only supported by bulbul:v3.

enable_cached_responsesboolean

Enable caching for the request. When enabled, identical requests will return cached audio instead of regenerating. Default is false.

Note: Currently in beta and only available for bulbul:v1 and bulbul:v2 models.

Response

Successful Response

request_idstring nullable required
audiosstring[] required

The output audio files in WAV format, encoded as base64 strings. Each string corresponds to one of the input texts.