Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

livekit-plugins-gnani

PyPI License

LiveKit Agents plugin for Gnani — high-accuracy Speech-to-Text (Prisma) and low-latency Text-to-Speech (Timbre) for Indian languages.

Gnani is a production-ready speech AI platform supporting 10+ Indian languages, real-time streaming, and multilingual transcription.

This integration is maintained by Gnani.ai.

Installation

pip install livekit-plugins-gnani

Or with uv:

uv add livekit-plugins-gnani

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

Install with the LiveKit Agents Gnani extra:

uv add "livekit-agents[gnani]"

Prerequisites

You need a Gnani API key. Gnani APIs have this.

Set your credentials as environment variables:

export GNANI_API_KEY="your-api-key"

Or pass the key in the constructor:

stt = STT(api_key="your-api-key", language="hi-IN")
tts = TTS(api_key="your-api-key")

Environment variables

Variable Purpose
GNANI_API_KEY API key for Gnani Vachana STT and TTS

Quick Start: VoiceSession snippet

The snippet below shows core VoiceSession wiring with Gnani WebSocket STT/TTS.

from livekit.agents import VoiceSession, room_io
from livekit.plugins import gnani, groq, silero

session = VoiceSession(
    stt=gnani.STT(
        language="en-IN",
        use_streaming=True,
    ),
    llm=groq.LLM(model="llama-3.1-8b-instant"),
    tts=gnani.TTS(
        voice="Nalini",
        model="timbre-v2.5",
        language="en-IN",
    ),
    vad=silero.VAD.load(),
)

await session.start(
    agent=MyAgent(),
    room=ctx.room,
    room_options=room_io.RoomOptions(
        audio_input=room_io.AudioInputOptions(sample_rate=16000),
        audio_output=room_io.AudioOutputOptions(sample_rate=16000),
    ),
)

Set use_streaming=False (STT) for REST — see below. TTS streams over WebSocket and synthesizes one-shot text over REST.

Service Construction

Speech-to-Text (REST)

from livekit.plugins.gnani import STT

stt = STT(
    language="hi-IN",
    use_streaming=False,
)

REST mode requires a VAD in the pipeline. LiveKit wraps the STT with stt.StreamAdapter automatically when use_streaming=False.

Speech-to-Text (Streaming WebSocket)

from livekit.plugins.gnani import STT

stt = STT(
    language="hi-IN",
    use_streaming=True,
    sample_rate=16000,
)

Text-to-Speech

from livekit.plugins.gnani import TTS

tts = TTS(
    voice="Nalini",
    model="timbre-v2.5",
    language="hi-IN",
)

synthesize() uses REST; stream() uses WebSocket, one connection per segment.

Services

STT

Mode Parameter Transport Description
REST use_streaming=False POST /stt/v3 File/buffer transcription. Requires VAD.
WebSocket use_streaming=True wss://api.vachana.ai/stt/v3/stream Real-time streaming with VAD. Default.

Streaming PCM Specification

All streaming audio must be sent as raw PCM binary frames — no container format (WAV, MP3) mid-stream.

Property 16 kHz 8 kHz
Encoding PCM signed 16-bit little-endian PCM signed 16-bit little-endian
Sample Rate 16,000 Hz 8,000 Hz
Channels 1 (mono) 1 (mono)
Samples per chunk 512 512
Bytes per frame 1,024 bytes (512 samples × 2 bytes) 1,024 bytes (512 samples × 2 bytes)
Frame duration 32 ms 64 ms

Frames must be sent at real-time cadence. See STT Realtime — PCM Specification for full details.

TTS

Mode Parameter Transport Description
REST synthesize() POST /api/v1/tts/inference Single-request synthesis.
WebSocket stream() wss://api.vachana.ai/api/v1/tts One request per segment.

Full Constructor Reference

STT — All parameters

from livekit.plugins.gnani import STT

stt = STT(
    language="en-IN",              # Default: "en-IN"
    sample_rate=16000,             # Default: 16000 (also: 8000, 44100, 48000)
    format="verbatim",             # Default: "verbatim" (also: "transcribe" for ITN)
    itn_native_numerals=False,     # Default: False
    use_streaming=True,            # Default: True (WebSocket); False = REST + VAD
    api_key=None,                  # Default: None (reads GNANI_API_KEY env var)
    base_url="https://api.vachana.ai",
)

TTS — All parameters

from livekit.plugins.gnani import TTS

tts = TTS(
    voice="Pranav",                # Default: "Pranav" (timbre-v2.0: Kaveri, Shubhra, Deepak)
    model="timbre-v2.0",           # Default: "timbre-v2.0" (also: "timbre-v2.5" with 42 voices)
    language=None,                 # timbre-v2.5 only — e.g. "hi-IN", "en-IN"
    sample_rate=16000,             # Default: 16000 (also: 8000, 22050, 44100)
    encoding="linear_pcm",         # Default: "linear_pcm" (also: "oggopus")
    container="wav",               # Default: "wav" (also: "raw", "mp3", "ogg")
    num_channels=1,                # Default: 1
    bitrate=None,                  # Default: None (also: "96k", "128k", "192k")
    api_key=None,                  # Default: None (reads GNANI_API_KEY env var)
    base_url="https://api.vachana.ai",
)

Supported Languages

STT Languages (Prisma)

STT uses BCP-47 locale codes (e.g. hi-IN, bn-IN).

For the full list of supported languages, see:

TTS Languages (Timbre)

The optional language parameter is supported for timbre-v2.5 only. For the full list, see TTS — Supported Languages.

Migration: The former model name vachana-voice-v3 has been renamed to timbre-v2.0. Update any model="vachana-voice-v3" calls to model="timbre-v2.0" (or omit model to use the default).

Available Voices

See the official voice list for the latest supported voices.

timbre-v2.0 (4 voices)

Voice ID Gender Description
Pranav Pranav Male Bold, Trustworthy
Kaveri Kaveri Female Confident, Bright
Shubhra Shubhra Female Gentle, Expressive
Deepak Deepak Male Grounded, Conversational

timbre-v2.5 (42 voices)

The expanded catalog includes voices across Hindi, English, Tamil, Telugu, Kannada, Malayalam, Marathi, Bengali, Gujarati, Punjabi, and Hinglish. Use model="timbre-v2.5" with an optional language parameter (e.g. language="hi-IN").

from livekit.plugins.gnani import TTS

tts = TTS(model="timbre-v2.5", voice="Nalini", language="hi-IN")

Architecture

livekit-plugins-gnani    ← This package (LiveKit Agents adapter)
  ├── STT: REST + WebSocket
  └── TTS: REST + SSE + WebSocket

This plugin directly implements the Gnani REST and WebSocket APIs using livekit.agents.http (for REST STT/TTS) and websockets (for streaming STT/TTS), adapting them into LiveKit's stt.STT and tts.TTS base classes. It uses the Prisma model for speech-to-text and the Timbre model for text-to-speech. No external SDK is required — all connection logic, authentication, and audio format handling is self-contained. Authentication uses a single api_key passed via the X-API-Key-ID header.

Documentation

LiveKit Compatibility

Tested with LiveKit Agents v1.6.x.

License

Apache 2.0 — see LICENSE.

Metadata

Release files for livekit-plugins-gnani 2.0.0b2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for livekit-plugins-gnani 2.0.0b2
File Size Uploaded Provenance Actions
livekit_plugins_gnani-2.0.0b2.tar.gz 12.2 kB With provenance Details for livekit_plugins_gnani-2.0.0b2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for livekit-plugins-gnani 2.0.0b2
File Interpreter ABI Platform Actions
livekit_plugins_gnani-2.0.0b2-py3-none-any.whl Python 3 none any Details for livekit_plugins_gnani-2.0.0b2-py3-none-any.whl

Total release size: 26.7 kB

Release files / livekit_plugins_gnani-2.0.0b2.tar.gz

Download URL livekit_plugins_gnani-2.0.0b2.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cf6af8b61b5ab02cb92d21202bedea29d017878d1ab279c2bc17aaa56b3d9a58
BLAKE2b-256 checksum
How to use checksums
796caa56dd51345bd9ac4b36658600a7a99c19c138ae0b03119b0e4604965fe5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Release files / livekit_plugins_gnani-2.0.0b2-py3-none-any.whl

Download URL livekit_plugins_gnani-2.0.0b2-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
583646565aac025c698bf984439201d5b86aaca4214642c3413a66fd2ac76b51
BLAKE2b-256 checksum
How to use checksums
cc1d1ff11a292937bb6bfe8ecfac4f5d59c85088170e20deb1429f005ba6e093
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

Security for livekit-plugins-gnani 2.0.0b2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for livekit_plugins_gnani-2.0.0b2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page