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
str
default:"UNSET"
Bulbul voice model, e.g. “bulbul:v3” or “bulbul:v2”. Defaults to ‘bulbul:v3’.
str
default:"UNSET"
Language of the text as a BCP-47 code, e.g. “en-IN” or “hi-IN”. Defaults to ‘en-IN’.
str
default:"UNSET"
Voice to speak with, e.g. “shubh”. Available speakers depend on the model. Defaults to ‘shubh’.
bool
default:"UNSET"
Stream audio as it is generated for lower latency. Turn off to synthesize each chunk in a single request. Defaults to True.
int
default:"UNSET"
Sample rate of the generated audio in Hz. Defaults to 24000.
str
default:"UNSET"
Audio encoding of the generated speech, e.g. “linear16”. Defaults to ‘linear16’.
float | None
default:"UNSET"
Voice pitch, -0.75 to 0.75. bulbul:v2 only. Defaults to None (not set).
float | None
default:"UNSET"
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.
float | None
default:"UNSET"
Voice loudness, 0.3 to 3.0. bulbul:v2 only. Defaults to None (not set).
float | None
default:"UNSET"
Expressiveness of the delivery, 0.01 to 1.0. Higher is more varied. bulbul:v3 only. Defaults to 0.6.
Literal['32k', '64k', '96k', '128k', '192k']
default:"UNSET"
Bitrate of compressed audio output: “32k”, “64k”, “96k”, “128k” or “192k”. Defaults to ‘128k’.
int
default:"UNSET"
Minimum number of characters collected before text is sent for synthesis while streaming. Defaults to 50.
int
default:"UNSET"
Maximum number of characters per synthesized chunk when long text is split into sentences. Defaults to 150.
bool | None
default:"UNSET"
Normalize English words and numbers, dates and similar entities before speaking. Helps with mixed-language text. bulbul:v2 only. Defaults to None (not set).