Skip to navigation

Best Practices (Bulbul:v3)

View as Markdown

This page covers Bulbul v3 (model="bulbul:v3", or omit model to get it by default). It has 37 short-name speakers such as shubh and priya. For persona-based voices, see the Best Practice Guide for Bulbul v4 Flash.

I want to…Go to
Pick REST, HTTP stream or WebSocketChoosing the right API mode
Tune pacePace
Pick a speaker for my languageSpeaker selection by language
Start from a presetUse-case presets (v3)

Moving to v4 Flash? See Migrating from Bulbul v3 for the parameter changes and a v3-to-v4 speaker mapping. To hear v3 speakers, see Voices.


Choosing the right API mode

v3 shares one request contract across all three transports.

RESTHTTP streamingWebSocket
EndpointPOST /text-to-speechPOST /text-to-speech/streamwss://api.sarvam.ai/text-to-speech/ws
Text limit2,500 characters3,500 characters2,500 characters per message
OutputJSON with base64 audiosChunked audio bytesIncremental base64 chunks
Sample rates8000 to 480008000, 16000, 22050, 240008000, 16000, 22050, 24000
Best forShort known text, batch, notificationsVoice agents, IVRMany utterances on one connection

For voice agent pipelines (LLM to TTS), prefer HTTP streaming or WebSocket. REST returns only after the full clip is generated, which adds silence before playback.

A minimal v3 call:

import os
from sarvamai import SarvamAI
from sarvamai.play import save
client = SarvamAI(api_subscription_key=os.environ["SARVAM_API_KEY"])
audio = client.text_to_speech.convert(
text="नमस्ते! आपका order 2 दिन में deliver हो जाएगा।",
language_code="hi-IN",
model="bulbul:v3",
speaker="priya",
)
save(audio, "output.wav")

Pace

Start with the defaults, then tune for your use case.

ParameterRangeDefault
pace0.5 to 2.01.0
temperature0.01 to 1.00.6
pitch-0.5 to 0.50.0
loudness0.1 to 2.51.0
PaceEffectUse case
0.8 to 0.9RelaxedEdTech, wellness, tutorials
1.0NaturalConversational agents
1.1 to 1.2BriskNotifications, IVR, news

pitch and loudness are accepted on v3 and behave the same way as on bulbul:v4-flash.


Speaker selection by language

Use short-name speakers (shubh, priya, and so on) with bulbul:v3. v4 persona IDs are rejected with 400, and the error lists the valid v3 speakers.

LanguageCodeRecommended maleRecommended female
Englishen-INratanishita
Hindihi-INshubh, ashutoshpriya, suhani
Telugute-INshubh, ratanneha, priya
Kannadakn-INshubh, ratanneha, ishita
Bengalibn-INrehanroopa, suhani
Tamilta-INratan, rohanishita, ritu
Odiaod-INshubhritu, pooja
Malayalamml-INshubhpooja
Marathimr-INratanpriya, ritu
Punjabipa-INmaniroopa, suhani
Gujaratigu-INratanpriya, ritu

varun is a dramatic character voice, not a neutral default. Reserve it for thriller or suspense content.


Use-case presets (v3)

Use caseLanguageSpeaker(s)PaceSample rate
Voice agenthi-INpriya / shubh1.016 kHz
IVR / telephonyhi-IN, en-INratan / ishita1.18 kHz
EdTechhi-IN, ta-INshubh / ishita0.922.05 kHz
BFSI notificationhi-IN, en-INashutosh / ratan1.122.05 kHz

Output formats

FormatBest for
wavAgents, archival
mp3Web and mobile
linear16Real-time agent buffers
mulaw, alawPSTN and 8 kHz telephony

aac, flac and opus are also available. Limits and the full codec list are on the Bulbul model page. For input formatting, preprocessing and pronunciation dictionaries, the guidance in the v4 Flash guide applies to v3 as well.