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.6"
Authentication
The Gnani plugin requires a Gnani API key .
Set GNANI_API_KEY in your .env file:
GNANI_API_KEY=<your-gnani-api-key>
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.
languagestringDefault: en-INLanguage code for the input audio. You can override it per call with recognize(language=...) or stream(language=...). 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. - Batch (REST): All streaming languages, plus
en-IN,hi-INfor English-Hindi bilingual transcription.
For the authoritative list, see Supported languages in the Gnani docs.
sample_rateintegerDefault: 16000Input audio sample rate in Hz. Supported values: 8000, 16000, 44100, and 48000.
use_streamingbooleanDefault: trueUse WebSocket streaming when true (the default), or REST recognition when false.
formatstringDefault: verbatimOutput transcript format, applied to both batch and streaming modes:
verbatim: the raw transcript, with spoken words written out as they're said (for example, "twenty five dollars on may third").transcribe: enables inverse text normalization (ITN), which converts spoken-form numbers, dates, times, and currency into their conventional written form (for example, "$25 on May 3").
Set itn_native_numerals to render digits in the language's native script when format is transcribe.
preferred_languagestringDefault: NoneBias results toward a single language in multilingual scenarios by passing a language code (for example, hi-IN). Applies to batch recognition.
itn_native_numeralsbooleanDefault: falseRender digits in the native script of the detected language instead of Arabic numerals. Applies when format is transcribe.
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.
PCM specification
Realtime streaming PCM audio specification for Gnani STT.
Voice AI quickstart
Get started with LiveKit Agents and Gnani.
Gnani TTS
Guide to the Gnani TTS plugin with LiveKit Agents.