---
title: "Text-to-Speech Stream Audio"
method: POST
path: "/text-to-speech/stream"
tags: ["textToSpeech"]
---

# Text-to-Speech Stream Audio

`POST /text-to-speech/stream`

Converts the input text into a streamed spoken audio response.

This endpoint supports streaming audio using the specified output codec (e.g., `audio/mpeg` for MP3). The response is returned as a binary audio stream, which can be played or saved directly by the client.

Supports the `dict_id` parameter to apply a [pronunciation dictionary](https://docs.sarvam.ai/api-reference-docs/pronunciation-dictionary/create) during synthesis.

## Headers

- `api-subscription-key` string, required

## Request body

- SarvamModelAPITextToSpeechStreamRequest
  - `text` string, required — The text to be converted into streamed speech. **Features:** - Max 3500 characters - Supports code-mixed text (English and Indic languages) **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'
  - `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'
  - `pitch` number, double, nullable — Controls the pitch of the audio. Range: -0.75 to 0.75. Default is 0.0. **Note:** Only supported for bulbul:v2.
  - `pace` number, double, nullable — Controls the speed of the audio. Default is 1.0. **Model-specific ranges:** - **bulbul:v3:** 0.5 to 2.0 - **bulbul:v2:** 0.3 to 3.0
  - `loudness` number, double, nullable — Controls the loudness of the audio. Range: 0.3 to 3.0. Default is 1.0. **Note:** Only supported for bulbul:v2.
  - `speech_sample_rate` '8000' | '16000' | '22050' | '24000' | '32000' | '44100' | '48000'
  - `enable_preprocessing` boolean — Controls whether normalization of English words and numeric entities is performed. Default is false.
  - `model` 'bulbul:v2' | 'bulbul:v3'
  - `temperature` number, double, nullable — Controls the randomness of the output. Range: 0.01 to 1.0. Default is 0.6. **Note:** Only supported for bulbul:v3.
  - `enable_cached_responses` boolean — Enable caching for the request. Default is false. Currently in beta.
  - `dict_id` string, 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](https://docs.sarvam.ai/api-reference-docs/pronunciation-dictionary/create). Only supported by **bulbul:v3**.
  - `output_audio_codec` 'mp3' | 'linear16' | 'mulaw' | 'alaw' | 'opus' | 'flac' | 'aac' | 'wav'
  - `output_audio_bitrate` '32k' | '64k' | '96k' | '128k' | '192k'

## Response `200`

Success. Returns a streamed audio response in the requested format (e.g., `audio/mpeg` for MP3, `audio/wav` for WAV).

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `422` — Unprocessable Entity
- `429` — Quota Exceeded
- `500` — Internal Server Error

---

[API](https://skmtc.dev/sarvam/apis/endpoints.md) · [All operations](https://skmtc.dev/sarvam/apis/endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sarvam/endpoints/revisions/2b7f7955b147/schema)
