Overview
This plugin allows you to use Gnani Vachana as an STT provider for your voice agents. Gnani provides high-accuracy speech recognition for Indian languages, including multilingual and code-switching scenarios, with both batch recognition and realtime WebSocket streaming.
Installation
Install the plugin from PyPI:
uv add "livekit-agents[gnani]~=1.5"
Authentication
The Gnani plugin requires a Gnani Vachana API key .
Set the following in your .env file:
GNANI_API_KEY=<your-gnani-api-key># OptionalGNANI_ORGANIZATION_ID=<your-organization-id>GNANI_USER_ID=<your-user-id>
Usage
Use Gnani STT in an AgentSession or as a standalone transcription service. For example, you can use this STT in the Voice AI quickstart.
from livekit.agents import AgentSessionfrom livekit.plugins import gnanisession = AgentSession(stt=gnani.STT(language="en-IN",sample_rate=16000,),# ... llm, tts, etc.)
Parameters
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
languageLanguageCodeDefault: en-INLanguage code for the input audio. Supported languages vary by mode:
- Streaming (WebSocket):
bn-IN,en-IN,gu-IN,hi-IN,kn-IN,ml-IN,mr-IN,pa-IN,ta-IN,te-IN,en-hi-IN-latn,en-hi-in-cm. - Batch (REST):
bn-IN,en-IN,gu-IN,hi-IN,kn-IN,ml-IN,mr-IN,pa-IN,ta-IN,te-IN,en-IN,hi-IN.
Use en-hi-IN-latn or en-hi-in-cm for English-Hindi code-mixed audio.
sample_rateintegerDefault: 16000Input audio sample rate in Hz. Supported values: 8000 and 16000.
Additional resources
The following resources provide more information about using Gnani with LiveKit Agents.
Python package
The livekit-plugins-gnani package on PyPI.
Plugin reference
Reference for the Gnani STT plugin.
GitHub repo
View the source or contribute to the LiveKit Gnani STT plugin.
Gnani site
Gnani's official site and product documentation.
Voice AI quickstart
Get started with LiveKit Agents and Gnani.
Gnani TTS
Guide to the Gnani TTS plugin with LiveKit Agents.