Skip to main content

Sarvam STT integration guide

How to use the Sarvam STT plugin for LiveKit Agents.

Overview

Sarvam provides advanced speech recognition technology optimized for Indian languages. With LiveKit's Sarvam integration and the Agents framework, you can build AI agents that provide high-accuracy transcriptions for Indian languages and accents.

Quick reference

This section provides a quick reference for the Sarvam STT 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 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 sarvam
session = AgentSession(
stt=sarvam.STT(
language="hi-IN",
model="saarika:v2.5",
),
# ... llm, tts, etc.
)

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

languagestringOptional

BCP-47 language code for supported Indian languages. See documentation for a complete list of supported languages.

modelstringOptionalDefault: saarika:v2.5

The Sarvam STT model to use. See documentation for a complete list of supported models.

Additional resources

The following resources provide more information about using Sarvam with LiveKit Agents.