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 the LiveKit Agents SDK
Add the livekit-agents[sarvam] package. It needs Python 3.10 or higher.
Add your keys
Create a .env file with LIVEKIT_URL, LIVEKIT_API_KEY, LIVEKIT_API_SECRET, and SARVAM_API_KEY.
Run your agent
Start it with python agent.py dev, then talk to it from a second terminal with python agent.py console.
pip install "livekit-agents[sarvam]>=1.8.6,<2" python-dotenvfrom dotenv import load_dotenv from livekit.agents.voice import Agent, AgentSession from livekit.plugins import sarvam load_dotenv() class VoiceAgent(Agent): def __init__(self) -> None: super().__init__( instructions="You are a helpful voice assistant. Be friendly and concise.", stt=sarvam.STT( language="unknown", # auto-detect, or "hi-IN", "ta-IN", ... model="saaras:v4", mode="transcribe", ), llm=sarvam.LLM(model="sarvam-105b-conversations"), tts=sarvam.TTS( target_language_code="en-IN", model="bulbul:v4-flash", speaker="simran_en_customer", ), ) async def on_enter(self): self.session.generate_reply() session = AgentSession( vad=None, # Sarvam STT runs its own VAD turn_handling={ "turn_detection": "stt", "endpointing": {"min_delay": 0.07}, }, )
python agent.py dev
Starts the agent and connects it to your LiveKit project. In a second terminal, run `python agent.py console` to talk to it.
Pass vad=None to AgentSession
Sarvam STT detects speech on the server. On livekit-agents 1.6.1 and later, leaving vad out installs the bundled Silero VAD, and two VADs can disagree about where a turn ends.
Leave out flush_signal
Sarvam ends each turn with its own VAD. AgentSession never flushes Sarvam STT, so flush_signal=True has no effect inside an agent.
Set turn detection to stt
Set turn_detection to "stt" inside turn_handling so the Sarvam plugin emits start and end of speech. The flat turn_detection keyword is deprecated.
Set endpointing min_delay to 0.07
Sarvam STT processes in about 70 ms. A 0.07 second minimum delay hands off to the language model as soon as transcription finishes.
IVR
IVR and call centres
Answer inbound and outbound calls in Hindi, Tamil, Bengali, and 7 other Indian languages, plus English.
Voice
Voice assistants
Auto-detect the caller's language and handle code-mixed speech such as Hinglish and Tanglish.
Telephony
Telephony agents
Connect agents to phone lines over SIP, with Sarvam handling transcription and speech.
Build it on LiveKit, or run it on Sarvam Voice Agents
Same Sarvam models. Pick full control or a managed platform for voice agents and AI calling agents.
LiveKit 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 LiveKit guide in the Sarvam docs.
Ready to build?
Follow the LiveKit guide in the Sarvam docs.