Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.inya.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

livekit-plugins-gnani is a thin LiveKit Agents adapter that wraps the Vachana STT and TTS APIs into LiveKit’s standard stt.STT and tts.TTS base classes. Drop it into any LiveKit voice agent pipeline and get high-accuracy Indian-language speech recognition and low-latency synthesis without managing WebSocket connections yourself.
gnani-vachana              ← Core SDK (REST, WebSocket, SSE clients)

livekit-plugins-gnani      ← This package (LiveKit Agents adapter)

Your LiveKit voice agent
All connection logic, authentication, and audio format handling live in the core SDK. The plugin is purely an adapter layer.

Installation

pip install livekit-plugins-gnani
This also installs gnani-vachana (the core SDK) as a dependency. Requirements: Python 3.10+

Prerequisites

You need a Gnani API key. Email speechstack@gnani.ai to get started — all new accounts receive free credits, no credit card required. Set your credentials as environment variables:
export GNANI_API_KEY="your-api-key"

# For REST STT only (optional — streaming STT and TTS need only GNANI_API_KEY):
export GNANI_ORGANIZATION_ID="your-org-id"
export GNANI_USER_ID="your-user-id"

Quick Start

Speech-to-Text

from livekit.plugins.gnani import STT

stt = STT(language="hi-IN")

# Pass to your LiveKit voice agent pipeline

Text-to-Speech

from livekit.plugins.gnani import TTS

tts = TTS(voice="sia")

# Pass to your LiveKit voice agent pipeline

STT — Speech-to-Text

The plugin exposes two STT modes matching the underlying Vachana API:
ModeMethodBest for
Streaming (WebSocket)DefaultLive conversations, real-time agents
Batch (REST)STT(mode="rest")Pre-recorded audio, file-based pipelines

Streaming (default)

Real-time transcription via WebSocket with Voice Activity Detection. This is the recommended mode for live voice agents.
from livekit.plugins.gnani import STT

stt = STT(
    language="hi-IN",         # BCP-47 language code
    sample_rate=16000,        # 8000 or 16000 Hz
)

Batch (REST)

File-based transcription in a single synchronous request. Audio clips up to 60 seconds.
from livekit.plugins.gnani import STT

stt = STT(
    language="hi-IN",
    mode="rest",
)

Code-switching (multilingual)

For audio that mixes Hindi and English, use the experimental Hinglish codes:
# Code-mixed: Latin + Devanagari output
stt = STT(language="en-hi-in-cm")

# Hinglish in Latin script only
stt = STT(language="en-hi-IN-latn")

TTS — Text-to-Speech

The plugin exposes Vachana TTS synthesis with 8 Indian voices.
from livekit.plugins.gnani import TTS

tts = TTS(
    voice="sia",              # Voice ID — see Available Voices below
    sample_rate=16000,        # Output sample rate: 8000–44100 Hz
    encoding="linear_pcm",   # linear_pcm or oggopus
)

Available Voices

VoiceID
Siasia
Rajuraju
Kanikakanika
Nikitanikita
Ravanravan
Simransimran
Karankaran
Nehaneha

Supported Languages

LanguageCode
Bengalibn-IN
English (India)en-IN
Gujaratigu-IN
Hindihi-IN
Kannadakn-IN
Malayalamml-IN
Marathimr-IN
Punjabipa-IN
Tamilta-IN
Telugute-IN
Hinglish (experimental)en-hi-in-cm
Hinglish Latin (experimental)en-hi-IN-latn

Further Reading