livekit-plugins-rumik-ai
Rumik AI text-to-speech plugin for LiveKit Agents.
Streams low-latency 24 kHz speech from Rumik's Silk models over a reusable WebSocket session:
- muga — emotion-controlled via a leading
[tone]tag (e.g.[happy],[sad]) plus optional<laugh>/<chuckle>/<sigh>events. Tuned for Romanized Hinglish. - mulberry — steered by a natural-language voice
descriptionor a presetspeaker, with optional pitch shift (f0_up_key).
Install
pip install livekit-plugins-rumik-ai
This depends on livekit-agents (1.5+). Set your key:
export RUMIK_API_KEY="your-rumik-api-key"
Quickstart
from livekit.agents import AgentSession
from livekit.plugins import rumik_ai
# muga: the LLM should start each reply with one tone tag, e.g. "[happy] ..."
session = AgentSession(
stt=...,
llm=...,
tts=rumik_ai.TTS(model="muga"),
)
Mulberry, steered by a voice description (or a preset speaker):
tts = rumik_ai.TTS(
model="mulberry",
description="warm, gentle female friend",
# speaker="ira", # optional preset voice, overrides description
# f0_up_key=2.0, # optional pitch shift, -12..12 semitones
)
Changing the voice at runtime
description, speaker, f0_up_key, and the sampling params are sent on every
request, so you can change mulberry's voice between turns without reconnecting — the
pooled WebSocket is reused (only a model change re-mints the session):
tts.update_options(description="excited young man, fast and energetic")
# the next synthesis request uses the new voice
Latency vs. smoothness
The default is model-aware:
- muga buffers the full LLM reply and synthesizes it in one request, so its leading
[tone]tag conditions the whole utterance (and there are no per-request TTFB gaps). - mulberry streams sentence-by-sentence for lower time-to-first-word, since it has no tone tag to protect.
Override either with full_response_aggregation:
rumik_ai.TTS(model="muga", full_response_aggregation=False, tone="neutral") # muga, lower latency
rumik_ai.TTS(model="mulberry", full_response_aggregation=True) # mulberry, smoother
When you turn aggregation off for muga, set a fallback tone= so every sentence
keeps a tone tag.
Barge-in & cancel
Built for the live "call with AI" case. When the caller talks over the agent, LiveKit interrupts the TTS and the plugin sends an explicit cancel to Rumik, so the in-flight generation stops immediately (and billing is finalized cleanly). The pooled WebSocket is kept warm across the interruption, so the next utterance doesn't pay a reconnect.
Configuration
| Argument | Models | Notes |
|---|---|---|
model |
both | "muga" (default) or "mulberry" |
tone |
muga | fallback tone when input is untagged |
description |
mulberry | natural-language voice description |
speaker |
mulberry | preset voice name, case-insensitive (e.g. ira, emma, noah); unknown/omitted falls back to description. Legacy speaker_1..speaker_4 still work |
f0_up_key |
mulberry | pitch shift, -12..12 |
temperature, top_p, top_k, repetition_penalty, max_new_tokens |
both | omitted unless set (Rumik defaults apply) |
full_response_aggregation |
both | buffer the full reply (True) vs. stream per sentence (False). Default: True for muga, False for mulberry |
api_key |
— | defaults to RUMIK_API_KEY |
base_url |
— | defaults to https://silk-api.rumik.ai |
Examples
See examples/ for a full voice agent (rumik_ai_agent.py) and a
record-to-WAV demo (rumik_ai_tts.py).
License
Apache-2.0
Release files for livekit-plugins-rumik-ai 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| livekit_plugins_rumik_ai-0.2.2.tar.gz | 17.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| livekit_plugins_rumik_ai-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.7 kB
Release files / livekit_plugins_rumik_ai-0.2.2.tar.gz
| Download URL | livekit_plugins_rumik_ai-0.2.2.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5206eb3f0f59098e3598363739575fb698038f7250492335e7667cfb967b564b
|
|
BLAKE2b-256 checksum How to use checksums |
5f3057b61fe7754fcac19c4e06e1975b4608549a5e5c365467fcfab04c4ddfad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|
Release files / livekit_plugins_rumik_ai-0.2.2-py3-none-any.whl
| Download URL | livekit_plugins_rumik_ai-0.2.2-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a2e5100a8f22cd7b91827c358d987dd20584e866f60aa85f4e967e6cb36af20d
|
|
BLAKE2b-256 checksum How to use checksums |
bd234c1de2276008b29dabfc8e85dc553d94f83df4ba5b763fb68dd1161bc992
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.7
|