LiveKit
Bakbak TTS for Indian languages in LiveKit Agents, with the official livekit-plugins-bakbak plugin.
livekit-plugins-bakbak is the official LiveKit Agents
plugin for Bakbak TTS. It streams each sentence of your agent’s reply over one
WebSocket as soon as the LLM finishes writing it, so speech starts while the
rest of the reply is still being generated.
Install
Requires livekit-agents 1.8.7 or newer (below 2.0) and Python 3.10+.
Use it in an agent
LiveKit calls prewarm() when the session starts, which opens the WebSocket
before the first turn.
Options
Change voice settings at any time; they apply from the next utterance:
Voices
Sentences
The default SentenceTokenizer is built for Indian text. It splits on the danda
(।, ॥) and Latin punctuation, never inside decimals, domains, titles such as
Dr. and डॉ., or list markers, and never inside an Indic conjunct. The first
sentence of a reply is sent as soon as it ends. It splits text exactly as the
Python and JavaScript
SDKs do.
eager_first_clause=True also sends the first clause of a long first sentence
on its own, for an earlier start.
Interruptions and errors
When the user interrupts, the plugin cancels the rest of the reply on the
server and keeps the connection open for the next turn. Errors carry the API’s
error_code and request_id (see Errors). LiveKit
retries failures before any audio; a failure after audio has started is never
retried, so nothing is spoken twice.
Migrating from livekit-plugins-raya
livekit-plugins-bakbak replaces livekit-plugins-raya.
BAKBAK_API_KEYreplacesRAYA_API_KEY(the old name still works, with a warning).- One WebSocket replaces one HTTP request per sentence, and audio arrives as
16-bit PCM, so numpy is no longer needed. The
encodingandcodecoptions are gone. - The default voice is now Anika M1; pass
voice_idto keep yours. IndicSentenceTokenizeris nowSentenceTokenizer(the old name still works).
The README covers transports, latency measurements and the plugin’s few deliberate differences from the SDKs.

