REST Stream
Convert text into spoken audio and stream it back as it is generated. The response is a binary audio stream (Transfer-Encoding: chunked) that you can play or save directly, with no base64 decoding. The default format is MP3 (audio/mpeg). Set output_audio_codec to change it.
Models
Both models use the same request format and accept the same parameters, languages and limits.
Differences from POST /text-to-speech
Only text is required. Supports the dict_id parameter to apply a pronunciation dictionary.
Authentication
Request
The text to convert into speech, up to 3,500 characters. Code-mixed text (English and Indic languages) is supported. Write Indic words in their native script for the best quality.
The language of the text, as a BCP-47 code. Both models accept all 11 codes. Default: en-IN. The language also guides the text normalization applied before synthesis.
The voice to use. Speaker names are case-sensitive and lowercase, and must match the chosen model. If omitted, the model default is used: shubh for bulbul:v3, shubh_enhi_ads for bulbul:v4-flash.
A speaker that does not match the model returns a 400 that lists the valid speakers. See the Voices guide for the speaker lists.
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.
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.
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.
The sample rate of the output audio in Hz. Default: 22050. Streaming accepts 8000, 16000, 22050 and 24000. Higher rates (32000, 44100, 48000) return a 400; use the REST API for those.
opus works at 8000, 16000 and 24000 Hz. At 22050 Hz it returns a 400.
Normalizes English words and numeric entities (such as numbers and dates) before synthesis. Accepted on both models. Default: false.
The model to use.
bulbul:v4-flash: the latest model, recommended for new integrations. Same request format asbulbul:v3, with 200+ persona voices.bulbul:v3: the API default whenmodelis omitted. 37 named speakers.
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.
Beta. Requests caching for identical requests. Behavior is not guaranteed, and identical requests can still return newly generated audio. Default: false.
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. Supported on both models.
Create and manage dictionaries with the Pronunciation Dictionary API. On this endpoint an unknown ID returns a 500 (“error preprocessing input text”), so confirm the ID exists before you stream.
The audio format of the streamed response. Default: mp3. Content types: mp3 audio/mpeg, wav audio/wav, aac audio/aac, flac audio/flac, linear16 audio/pcm, mulaw audio/mulaw, alaw audio/alaw, opus audio/opus.
The bitrate of the streamed audio. One of 32k, 64k, 96k, 128k or 192k. Default: 128k. Other values (such as 256k) return a 400.
Response
Success. Returns a chunked audio stream. The Content-Type matches output_audio_codec (audio/mpeg for the default MP3).