Skip to main content

Vakyam TTS plugin guide

How to use the Vakyam TTS plugin for LiveKit Agents.

Available inPython

Overview

This plugin allows you to use Vakyam AI  as a TTS provider for your voice agents. Vakyam's Raaga 1 model provides natural, low-latency speech synthesis for Indian languages, with realtime streaming over WebSocket and one-shot synthesis over HTTP streaming.

Installation

Install the plugin from PyPI:

uv add "livekit-agents[vakyam]~=1.8"

Authentication

The Vakyam plugin requires a Vakyam API key .

Set VAKYAM_API_KEY in your .env file:

VAKYAM_API_KEY=<your-vakyam-api-key>

Usage

Use Vakyam TTS within an AgentSession or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.

from livekit.agents import AgentSession
from livekit.plugins import vakyam
session = AgentSession(
tts=vakyam.TTS(
model="raaga-v1",
voice="Archana",
language="ta-IN",
sample_rate=24000,
),
# ... llm, stt, etc.
)

Realtime streaming through stream() uses Vakyam's WebSocket API and sentence-tokenizes LLM output, because Vakyam synthesizes one complete sentence per request. One-shot synthesis through synthesize() uses HTTP streaming. WebSocket connections are pooled and reused across agent turns. On interruption, the plugin cancels the active utterance and returns the connection to the pool, so the next turn starts without reconnecting.

Voices

Vakyam voices are identified by a preset name, such as Archana, and the same voice can speak across supported languages. List the available voices with the Vakyam voices API , or pass a custom voice ID beginning with vc_ to the voice parameter. To learn more, see Voices & languages  in the Vakyam docs.

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

modelstringDefault: raaga-v1

The Vakyam TTS model to use. Currently raaga-v1.

voicestringDefault: Archana

Voice to use for synthesis. Set to a preset voice name or a custom voice ID beginning with vc_. See Voices to find voice names.

languagestringDefault: ta-IN

Language code for the input text. Supported values: bn-IN, en-IN, gu-IN, hi-IN, kn-IN, mr-IN, ta-IN, te-IN.

sample_rateintegerDefault: 24000

Output PCM sample rate in Hz. Supported values: 8000, 16000, 24000, 48000.

speedfloatDefault: 1.0

Speaking rate multiplier from 0.5 to 2.0, where 1.0 is normal speed.

base_urlstringDefault: https://api.vakyam.ai

Vakyam API base URL.

tokenizertokenize.SentenceTokenizer

Sentence tokenizer used to split LLM output for streaming synthesis. Defaults to LiveKit's built-in sentence tokenizer.

Use update_options() to change model, voice, language, sample_rate, or speed for streams created after the call.

Additional resources

The following resources provide more information about using Vakyam with LiveKit Agents.