Overview
Sarvam provides high-quality text-to-speech technology optimized for Indian languages. With LiveKit's Sarvam integration and the Agents framework, you can build voice AI agents that sound natural in Indian languages.
Quick reference
This section provides a quick reference for the Sarvam TTS plugin. For more information, see Additional resources.
Installation
Install the plugin from PyPI:
pip install "livekit-agents[sarvam]~=1.0"
Authentication
The Sarvam plugin requires a Sarvam API key.
Set SARVAM_API_KEY
in your .env
file.
Usage
Use Sarvam TTS within an AgentSession
or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.
from livekit.plugins import sarvamsession = AgentSession(tts=sarvam.TTS(target_language_code="hi-IN",speaker="anushka",)# ... llm, stt, etc.)
Parameters
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
BCP-47 language code for supported Indian languages. For example: hi-IN
for Hindi, en-IN
for Indian English. See documentation for a complete list of supported languages.
The Sarvam TTS model to use. Currently only bulbul:v2
is supported. See documentation for a complete list of supported models.
Voice to use for synthesis. See documentation for a complete list of supported voices.
Voice pitch adjustment. Valid range: -20.0 to 20.0.
Speech rate multiplier. Valid range: 0.5 to 2.0.
Volume multiplier. Valid range: 0.5 to 2.0.
Additional resources
The following resources provide more information about using Sarvam with LiveKit Agents.
Python package
The livekit-plugins-sarvam
package on PyPI.
Plugin reference
Reference for the Sarvam TTS plugin.
GitHub repo
View the source or contribute to the LiveKit Sarvam TTS plugin.
Sarvam docs
Sarvam's full docs site.
Voice AI quickstart
Get started with LiveKit Agents and Sarvam.
Sarvam STT
Guide to the Sarvam STT integration with LiveKit Agents.