Skip to main content

livekit-plugins-vaakini

LiveKit Agents plugin for Vaakini: text to speech in 12 Indian languages with one model, vaakini-tts-1.

Full documentation: docs.vaakini.com/livekit.

Install

pip install livekit-plugins-vaakini

Usage

from livekit.agents import AgentSession
from livekit.plugins import vaakini

session = AgentSession(
    tts=vaakini.TTS(voice="Monika", language="hi"),
    # ... stt, llm, vad
)

Set VAAKINI_API_KEY to your API key, from the dashboard at vaakini.com (or pass api_key=).

TTS(...)

Argument Default
voice required a Vaakini voice's name, in any case ("Monika"), or the id of one of your org's custom voices ("cv_…"); GET /v1/voices lists them
language None the language the text is in: "as", "bn", "en", "gu", "hi", "kn", "ml", "mr", "or", "pa", "ta" or "te". Left out, the model picks it from each sentence's script
model "vaakini-tts-1" the model; this is the only one
normalize None (on) numbers, currency, dates, times, phone numbers, URLs and emails spoken as words; False turns it off
temperature None sampling temperature, 0.1 to 1.5: lower is steadier
top_k None sample from the k likeliest codes, 1 to 2048
top_p None nucleus sampling, above 0 and at most 1
repetition_penalty None penalty on recently repeated codes, 0 to 5
api_key $VAAKINI_API_KEY your Vaakini API key
base_url wss://api.vaakini.com Vaakini's URL
http_session the job's an aiohttp session to connect with

normalize, temperature, top_k, top_p and repetition_penalty are sent only when given: left as None, the model's own default applies. The audio is 24000 Hz, 16-bit, mono.

Vaakini checks the settings: when the session starts, the plugin connects and a wrong setting is logged as an error, and a reply with a wrong one fails with APIStatusError (bad_request, not retryable).

How a reply is spoken

The plugin streams a reply's text to Vaakini as the LLM writes it. Vaakini splits it into sentences and speaks each as soon as it is complete, so the first audio follows the reply's first sentence. Transcripts follow the audio a sentence at a time. tts.synthesize(text) speaks a text you have in full, the same way.

Changing settings mid-session

tts.update_options(voice="Bunty", temperature=0.6)
tts.update_options(temperature=None)  # back to the model's default

Replies that start afterwards use the new settings. A setting left out keeps its value; None puts one back to the model's default.

Connections

When an AgentSession starts, it calls tts.prewarm(): the plugin connects to Vaakini, which readies the model for the current settings at once, so the first reply doesn't wait for either. Idle connections stay open between replies, for up to about 30 minutes, and are replaced at once when a server restarts.

Interruptions

When the agent is interrupted, the plugin cancels the reply at Vaakini, which stops speaking it, and keeps the connection open, so the next reply starts on a warm connection.

Metrics

TTSMetrics.characters_count is the characters Vaakini spoke for the reply, which are the ones it charges for: the reply's sentences, without the spaces between them. An interrupted reply reports its metrics too (TTSMetrics.cancelled set), counting the sentences sent in full before the interruption.

License

Apache-2.0.

Metadata

Release files for livekit-plugins-vaakini 0.1.0

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-vaakini 0.1.0
File Size Uploaded Provenance Actions
livekit_plugins_vaakini-0.1.0.tar.gz 14.2 kB Without provenance Details for livekit_plugins_vaakini-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for livekit-plugins-vaakini 0.1.0
File Interpreter ABI Platform Actions
livekit_plugins_vaakini-0.1.0-py3-none-any.whl Python 3 none any Details for livekit_plugins_vaakini-0.1.0-py3-none-any.whl

Total release size: 30.9 kB

Release files / livekit_plugins_vaakini-0.1.0.tar.gz

Download URL livekit_plugins_vaakini-0.1.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c340f73c57a055534dd9372ec2342505ffee57b85fda5faf0ade1ea7a16e3f75
BLAKE2b-256 checksum
How to use checksums
28f5abe4feda7967dd3b2731574ebd892d12ce70d57e6f598d951ca4cb641833
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / livekit_plugins_vaakini-0.1.0-py3-none-any.whl

Download URL livekit_plugins_vaakini-0.1.0-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
40116a402d6f388fbdc519c72871de137f415a7ac66239a685012e87a69e5bdf
BLAKE2b-256 checksum
How to use checksums
a784107990d50f21e4fa3e0bd99853fdca27e8019867eda11b12b22db7c43506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for livekit-plugins-vaakini 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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

0.1.0 This release

2 release files No provenance

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