Overview
This plugin allows you to use Sarvam as an STT provider for your voice agents.
Installation
Install the plugin:
uv add "livekit-agents[sarvam]~=1.4"
pnpm add @livekit/agents-plugin-sarvam@1.x
Authentication
The Sarvam plugin requires a Sarvam API key.
Set SARVAM_API_KEY in your .env file.
Usage
Use Sarvam STT in an AgentSession or as a standalone transcription service. For example, you can use this STT in the Voice AI quickstart.
from livekit.plugins import sarvamsession = AgentSession(stt=sarvam.STT(language="en-IN",model="saaras:v3",mode="transcribe", # default),# ... llm, tts, etc.)
import * as sarvam from '@livekit/agents-plugin-sarvam';const session = new voice.AgentSession({stt: new sarvam.STT({languageCode: "en-IN",model: "saaras:v3",mode: "transcribe", // default}),// ... llm, tts, etc.});
Parameters
This section describes some of the available parameters. See the plugin reference links in the Additional resources section for a complete list of all available parameters.
stringOptionalBCP-47 language code. Language support varies by model:
saaras:v3supports the full set of plugin-supported languages.saarika:v2.5andsaaras:v2.5support a smaller subset.
See documentation for a complete list of supported languages.
In Node.js this parameter is called languageCode.
stringOptionalDefault: saarika:v2.5The Sarvam STT model to use. Valid values are:
saarika:v2.5saaras:v2.5saaras:v3
saaras:v3 is the recommended model for advanced mode control and broader language support.
stringOptionalDefault: transcribeTranscription mode for saaras:v3. Valid values are:
transcribetranslateverbatimtranslitcodemix
Only default transcription behavior is supported for saarika:v2.5 and saaras:v2.5 models.
stringOptionalOptional prompt for translation workflows on saaras models.
Additional resources
The following resources provide more information about using Sarvam with LiveKit Agents.