Usage guide
Setup, environment variables, and Python/JavaScript/Go usage examples.
SarvamAITTS
Text-to-speech with Sarvam AI’s Bulbul voices, using your Sarvam key. Natural-sounding speech in Indian languages and Indian English. Authenticates with SARVAMAI_API_KEY from your environment, or an explicitapi_key.
Fields
Language of the text as a BCP-47 code, e.g. “en-IN” or “hi-IN”. Defaults to ‘en-IN’.
Voice to speak with, e.g. “shubh”. Available speakers depend on the model. Defaults to ‘shubh’.
Stream audio as it is generated for lower latency. Turn off to synthesize each chunk in a single request. Defaults to True.
Speaking speed: 0.3 to 3.0 on bulbul:v2, 0.5 to 2.0 on bulbul:v3. Set to None to leave it to the model. Defaults to 1.0.
Expressiveness of the delivery, 0.01 to 1.0. Higher is more varied. bulbul:v3 only. Defaults to 0.6.
Bitrate of compressed audio output: “32k”, “64k”, “96k”, “128k” or “192k”. Defaults to ‘128k’.
Minimum number of characters collected before text is sent for synthesis while streaming. Defaults to 50.
Maximum number of characters per synthesized chunk when long text is split into sentences. Defaults to 150.