Skip to navigation

REST

View as Markdown

Convert text into spoken audio. The response is JSON, and each item in audios is base64-encoded audio that you must decode before use. The audio is WAV unless you set output_audio_codec.

Models

ModelSpeakersDefault speaker
bulbul:v4-flash200+ persona IDs such as simran_en_customershubh_enhi_ads
bulbul:v3 (API default when model is omitted)37 names such as shubhshubh

Both models use the same request format and accept the same parameters, languages and limits.

Ranges and defaults (both models)

ParameterRangeDefault
text1 to 2,500 characters
pace0.5 to 2.01.0
pitch-0.5 to 0.50.0
loudness0.1 to 2.51.0
temperature0.01 to 1.00.6
speech_sample_rate8000, 16000, 22050, 24000, 32000, 44100, 48000 Hz22050 Hz

Speakers are not shared between models. A speaker that does not match the chosen model returns a 400 that lists the valid speakers.

Authentication

api-subscription-keystring
API Key authentication via header

Request

This endpoint expects an object.
textstringRequired

The text to convert into speech, up to 2,500 characters. Code-mixed text (English and Indic languages) is supported. Write Indic words in their native script for the best quality.

language_codeenumRequired

The language of the text, as a BCP-47 code. Both models accept all 11 codes. The language also guides the text normalization applied before synthesis.

speakerenum or nullOptionalDefaults to shubh

The voice to use. Speaker names are case-sensitive and lowercase, and must match the chosen model.

  • bulbul:v3 (default shubh): shubh, aditya, ritu, priya, neha, rahul, pooja, rohan, simran, kavya, amit, dev, ishita, shreya, ratan, varun, manan, sumit, roopa, kabir, aayan, ashutosh, advait, anand, tanya, tarun, sunny, mani, gokul, vijay, shruti, suhani, mohit, kavitha, rehan, soham, rupali
  • bulbul:v4-flash (default shubh_enhi_ads): 200+ personas named <name>_<language>_<style>, such as shubh_hi_devotional or simran_en_customer. See the Voices guide for the full catalog.
pitchdouble or nullOptional-0.5-0.5

Controls the pitch of the audio. Lower values give a deeper voice and higher values a sharper one. Range: -0.5 to 0.5. Default: 0.0. Values outside the range return a 400.

pacedouble or nullOptional0.5-2Defaults to 1

Controls the speed of the audio. Lower values give slower speech and higher values faster speech. Range: 0.5 to 2.0. Default: 1.0. Values outside the range return a 400.

loudnessdouble or nullOptional0.1-2.5

Controls the loudness of the audio. Lower values are quieter and higher values louder. Range: 0.1 to 2.5. Default: 1.0. Values outside the range return a 400.

speech_sample_rateenum or nullOptionalDefaults to 22050

The sample rate of the output audio in Hz. Default: 22050. The REST API accepts 8000, 16000, 22050, 24000, 32000, 44100 and 48000. The streaming APIs accept only 8000, 16000, 22050 and 24000.

enable_preprocessingbooleanOptionalDefaults to false

Normalizes English words and numeric entities (such as numbers and dates) before synthesis. Accepted on both models. Default: false.

modelenumOptional

The model to use.

  • bulbul:v4-flash: the latest model, recommended for new integrations. Same request format as bulbul:v3, with 200+ persona voices.
  • bulbul:v3: the API default when model is omitted. 37 named speakers.
Allowed values:
output_audio_codecenum or nullOptionalDefaults to wav

The audio format of the response. Default: wav.

opus works at 8000, 16000, 24000 and 48000 Hz. At the default 22050 Hz it returns a 400, so set speech_sample_rate when you use it.

temperaturedouble or nullOptional0.01-1Defaults to 0.6

Controls how much randomness and expressiveness the model uses. Lower values give steadier, more consistent speech. Higher values sound more expressive but can introduce artifacts. Range: 0.01 to 1.0. Default: 0.6.

dict_idstring or nullOptional

The ID of a pronunciation dictionary to apply. Matching words in the text are replaced with their custom pronunciations before synthesis. Format: p_ followed by 8 hex characters. An unknown ID returns a 404.

Create and manage dictionaries with the Pronunciation Dictionary API. Supported on both models.

enable_cached_responsesbooleanOptionalDefaults to false

Beta. Requests caching for identical requests. Behavior is not guaranteed, and identical requests can still return newly generated audio. Default: false.

Response

Successful Response
request_idstring or null
audioslist of strings

The generated audio as base64-encoded strings, in the format set by output_audio_codec (WAV by default).

Errors

400
Bad Request Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error