Text-to-Speech Overview
Sarvam AI text-to-speech turns text into natural speech in 11 Indian languages. It is powered by the Bulbul models:
- Bulbul v4 Flash is the latest model, with 200+ persona voices. Use it for new integrations.
- Bulbul v3 is the API default when
modelis omitted, with 37 named speakers.
Both models use the same request format, limits and APIs.
Building with an AI coding assistant? Install the Sarvam text-to-speech skill to generate correct TTS code:
See Agent Skills for the full list.
Make Your First Request
Get an API key from the dashboard and set it as the SARVAM_API_KEY environment variable. Then send a request to the REST API. Each item in the audios array of the response is base64-encoded audio (WAV by default), so the examples decode it and save output.wav.
Want to hear the voices first? Browse audio samples for every speaker on the Voices page, or try your own text in the playground.
Choose an API
All three APIs use the same models, voices and parameters. They differ in how audio is delivered and how interactive the connection is.
Which one should I use?
- The text is short and known up front: use REST.
- You want playback to start sooner, or you are on a server or serverless runtime: use HTTP stream. You get audio you can pipe straight to a file or player.
- You are building a voice agent, or sending text as an LLM produces it: use WebSocket. You keep one connection open across turns.
For a side-by-side comparison, see Which Text-to-Speech API to Use.
Common Parameters
These parameters work on all three APIs and on both models.
Audio Formats
Set the format with output_audio_codec. All formats work on REST, HTTP stream and WebSocket.
Limits
Next Steps
Need help? Reach us on Discord.