Skip to main content

LiveKit Agents plugin for Gnani Vachana speech AI — STT & TTS for Indian languages

Project description

livekit-plugins-gnani

PyPI License

LiveKit Agents plugin for Gnani Vachana — high-accuracy Speech-to-Text and low-latency Text-to-Speech for Indian languages.

Vachana is a production-ready speech AI platform by Gnani.ai supporting 10+ Indian languages with real-time streaming, multilingual transcription, and code-switching capabilities.

Installation

pip install livekit-plugins-gnani

This will also install the websockets and livekit-agents packages as dependencies.

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):
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")

# Use with a LiveKit voice agent pipeline

Text-to-Speech

from livekit.plugins.gnani import TTS

# REST (default) — single-request batch synthesis
tts = TTS(voice="Karan")

# SSE — streaming via Server-Sent Events (lower latency)
tts = TTS(voice="Karan", synthesize_method="sse")

# WebSocket — real-time streaming via stream() (lowest latency)
tts = TTS(voice="Karan", synthesize_method="websocket")

All three modes work with the standard LiveKit voice agent pipeline. The synthesize_method controls which transport synthesize() uses (REST, SSE, or WebSocket). The stream() method always uses WebSocket regardless of this setting.

Features

STT

  • Batch recognition — REST API (POST /stt/v3) for file-based transcription
  • Real-time streaming — WebSocket API for live audio transcription with VAD
  • 10 Indian languages — bn-IN, en-IN, gu-IN, hi-IN, kn-IN, ml-IN, mr-IN, pa-IN, ta-IN, te-IN
  • Code-switching — Hinglish (en-hi-IN-latn) and Hindi-English mixed (en-hi-in-cm) for streaming
  • Sample rates — 8 kHz and 16 kHz

TTS

  • REST synthesis — single-request batch audio generation (synthesize_method="rest")
  • SSE streaming — lower-latency chunked synthesis via Server-Sent Events (synthesize_method="sse")
  • WebSocket synthesis — lowest-latency synthesis via synthesize_method="websocket" or the stream() method
  • 6 voices — Karan, Simran, Nara, Riya, Viraj, Raju
  • Configurable output — sample rate (8000–44100), encoding (linear_pcm, oggopus), container (raw, mp3, wav, mulaw, ogg)

Supported Languages

Language Code
Bengali bn-IN
English (India) en-IN
Gujarati gu-IN
Hindi hi-IN
Kannada kn-IN
Malayalam ml-IN
Marathi mr-IN
Punjabi pa-IN
Tamil ta-IN
Telugu te-IN

Available Voices

Voice ID Gender Description
Karan Karan Male Bold, Trustworthy
Simran Simran Female Confident, Bright
Nara Nara Female Gentle, Expressive
Riya Riya Female Cheerful, Energetic
Viraj Viraj Male Commanding, Dynamic
Raju Raju Male Grounded, Conversational

Architecture

This plugin directly implements the Gnani Vachana REST and WebSocket APIs using aiohttp (for batch STT/TTS) and websockets (for streaming STT/TTS), adapting them into LiveKit's stt.STT and tts.TTS base classes. No external SDK is required — all connection logic, authentication, and audio format handling is self-contained.

Documentation

License

Apache 2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

livekit_plugins_gnani-1.6.4.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

livekit_plugins_gnani-1.6.4-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file livekit_plugins_gnani-1.6.4.tar.gz.

File metadata

  • Download URL: livekit_plugins_gnani-1.6.4.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for livekit_plugins_gnani-1.6.4.tar.gz
Algorithm Hash digest
SHA256 c1b5f0f07e1cdfcd74c71f159146dbc723b0103591e5f4b223eebb539cc465bb
MD5 bce5b5360d856a4807eea0651ecee6a3
BLAKE2b-256 3c512dab2020ef904ab20701fddec971bb8e08793f86d51af8363174b6aa4177

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_gnani-1.6.4.tar.gz:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file livekit_plugins_gnani-1.6.4-py3-none-any.whl.

File metadata

File hashes

Hashes for livekit_plugins_gnani-1.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2d0945828dd13dc2211b8d38ee750b7daa8f1726467d4730ad5dd375bf42cb75
MD5 3859abb018f12dec24e2c8c0e98f90b3
BLAKE2b-256 70e333f47e6f2c2fa1ca7ab4b61749964b97a83d8e38ec63de72dc9690f89686

See more details on using hashes here.

Provenance

The following attestation bundles were made for livekit_plugins_gnani-1.6.4-py3-none-any.whl:

Publisher: publish.yml on livekit/agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page