abundant-finland-34492
11/18/2025, 10:20 AMtall-airline-16756
11/18/2025, 10:21 AMtall-airline-16756
11/18/2025, 10:21 AMpip install livekit-plugins-sarvam
Or, if you’re setting up LiveKit Agents, just include it like this:
uv add "livekit-agents[sarvam]~=1.2"
For authentication, you’ll need a Sarvam API key, which you can get from the Sarvam dashboard. Just make sure to store it in your environment variable SARVAM_API_KEY.
Here’s a simple example to illustrate usage:
from livekit.plugins import sarvam
agent = AgentSession(
stt=sarvam.STT(language="hi-IN", model="saarika:v2.5"),
tts=sarvam.TTS(target_language_code="hi-IN", speaker="anushka")
)
If you'd like to see a full example, there’s a wonderful one available in the LiveKit Python examples repository that walks you through the entire integration of Sarvam STT and TTS in a voice agent pipeline.
Also, here are some additional resources that might be helpful:
• Sarvam TTS Plugin Guide
• Sarvam STT Plugin Guide
• GitHub Repository
If you have any more questions or need further assistance, feel free to reach out—I'm here to help!
Sources: livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/stt.py | Sarvam TTS plugin guide | LiveKit Docs | Sarvam STT plugin guide | LiveKit Docs | pipeline-tts/sarvam.pyabundant-finland-34492
11/18/2025, 11:42 AMtall-airline-16756
11/18/2025, 11:42 AMlivekit-plugins-sarvam plugin. This plugin takes care of everything you need—like authentication, API connections, WebSocket streaming, and data formatting—so you don’t have to worry about the technical details.
At the moment, there aren't any alternative code resources or methods to integrate Sarvam AI STT and TTS with LiveKit without this plugin. All the examples and documentation we have are designed around using it for the best results.
If you have a particular scenario in mind or need a hand with anything specific, please feel free to share! I’m here to guide you through it.
Sources: livekit-plugins/livekit-plugins-sarvam/pyproject.toml | Sarvam STT plugin guide | LiveKit Docs | Sarvam TTS plugin guide | LiveKit Docs | pipeline-tts/sarvam.pyabundant-finland-34492
11/18/2025, 11:56 AMtall-airline-16756
11/18/2025, 11:56 AMtarget_language_code needs to be explicitly set to a supported BCP-47 language code because Sarvam TTS doesn’t automatically detect and respond in the same language the user spoke. But don’t worry—we can work around this by detecting the user’s spoken language using STT and then updating the TTS settings dynamically.
Here’s a friendly guide on how to do this:
• Start by using Sarvam STT to process the user’s input in a set language, like hi-IN for Hindi.
• Then, programmatically update the TTS language with the update_options method, such as tts.update_options(target_language_code="hi-IN").
• Make sure to keep the STT and TTS language settings synchronized so everything flows smoothly.
Just so you know, Sarvam TTS supports these languages: bn-IN, en-IN, gu-IN, hi-IN, kn-IN, ml-IN, mr-IN, od-IN, pa-IN, ta-IN, and te-IN.
If you’d like, I’m here to provide a detailed example or walk you through implementing dynamic language switching—just let me know!
Sources: Gladia STT plugin guide | LiveKit Docs | Sarvam TTS plugin guide | LiveKit Docs | pipeline-tts/changing_language/README.md | livekit-plugins/livekit-plugins-sarvam/livekit/plugins/sarvam/__init__.py