Speech-to-Text
Accurate transcription built for Indian accents, dialects, and real-world audio with speaker diarisation.
Text-to-Speech
Natural, expressive voices in 10 Indian languages and English, for conversational agents, dubbing, and accessibility.
Language model
Multilingual model with support for Indian languages, for text generation and reasoning.
Install Pipecat
Add the pipecat-ai[daily,sarvam] package. It needs Python 3.9 or higher.
Add your API key
Set SARVAM_API_KEY in a .env file in your project directory.
Run your agent
Start it with python agent.py, then open the Daily room URL it prints and start talking.
pip install "pipecat-ai[daily,sarvam]" python-dotenv loguruimport os from pipecat.pipeline.pipeline import Pipeline from pipecat.services.sarvam.llm import SarvamLLMService from pipecat.services.sarvam.stt import SarvamSTTService from pipecat.services.sarvam.tts import SarvamTTSService stt = SarvamSTTService( api_key=os.getenv("SARVAM_API_KEY"), language="hi-IN", # or "unknown" to auto-detect model="saaras:v4", mode="transcribe", ) tts = SarvamTTSService( api_key=os.getenv("SARVAM_API_KEY"), settings=SarvamTTSService.Settings( model="bulbul:v4-flash", voice="ishita_hi_devotional", language="hi-IN", min_buffer_size=20, ), sample_rate=24000, ) llm = SarvamLLMService( api_key=os.getenv("SARVAM_API_KEY"), settings=SarvamLLMService.Settings(model="sarvam-105b"), ) pipeline = Pipeline([ transport.input(), stt, context_aggregator.user(), llm, tts, transport.output(), context_aggregator.assistant(), ])
python agent.py
Runs the pipeline. With the Daily transport, this creates a room and prints a URL. Open it in a browser to talk to the agent.
Set the TTS model explicitly
Pass model="bulbul:v4-flash" in SarvamTTSService.Settings. Without it you can land on an older model and lose the v4 persona voices.
Keep language and voice in Settings
On current Pipecat versions, language and voice belong in SarvamTTSService.Settings, not as constructor arguments.
Lower min_buffer_size for faster first audio
The default is 50 characters. Try 20 to shorten the wait before the first audio chunk.
Match sample_rate to your transport
Set sample_rate on SarvamTTSService to the transport rate. Streaming supports up to 24000 Hz.
IVR
IVR and call centres
Build conversational IVR in Hindi, Tamil, Bengali, and 7 other Indian languages, plus English.
Voice
Voice assistants
Stream speech in and out in real time, with code-mixed speech such as Hinglish handled natively.
Speech-to-English
Speech-to-English agents
Use Saaras in translate mode so callers speak an Indian language and your English-language model reads English text.
Build it on Pipecat, or run it on Sarvam Voice Agents
Same Sarvam models. Pick full control or a managed platform for voice agents and AI calling agents.
Pipecat with Sarvam APIs
- You host the agent
- You wire the models together
- You set up telephony
- You build testing and analytics
- Billed per API call
Sarvam Voice Agents
- Sarvam hosts every call
- Models tuned together
- Rent a number, or bring Exotel, Smartflo, Plivo
- Testing, campaigns and analytics built in
- ₹3.50 to ₹3.00 a minute, models included
Ready to build? Follow the Pipecat guide in the Sarvam docs.
Ready to build?
Follow the Pipecat guide in the Sarvam docs.