Skip to main content

livekit-plugins-rumik

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 description or a preset speaker, with optional pitch shift (f0_up_key).

Migrating from livekit-plugins-rumik-ai

This package is the continuation of livekit-plugins-rumik-ai (last release 0.2.2) under a new name. The API is unchanged. Swap the requirement and one import line:

- livekit-plugins-rumik-ai==0.2.2
+ livekit-plugins-rumik>=0.2.3
- from livekit.plugins import rumik_ai
+ from livekit.plugins import rumik as rumik_ai   # the rest of your code stays the same

The two packages install under different module names, so they never overwrite each other. You can uninstall the old one at your convenience.

Install

pip install livekit-plugins-rumik

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

# muga: the LLM should start each reply with one tone tag, e.g. "[happy] ..."
session = AgentSession(
    stt=...,
    llm=...,
    tts=rumik.TTS(model="muga"),
)

Mulberry, steered by a voice description (or a preset speaker):

tts = rumik.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.TTS(model="muga", full_response_aggregation=False, tone="neutral")  # muga, lower latency
rumik.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.

Connection lifecycle

The session stays open between replies, including long pauses: the plugin answers the server's pings and sends a keepalive before the server's idle timeout. Sessions are refreshed every few minutes, and the replacement is opened in the background, so a reply never waits on a new connection. prewarm() (called for you by AgentSession) opens the first one before the first reply. A TTS instance that receives no requests for 10 minutes closes its session; the next request opens a new one. Call aclose() when you are done.

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_agent.py) and a record-to-WAV demo (rumik_tts.py).

License

Apache-2.0

Metadata

Release files for livekit-plugins-rumik 0.2.3

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-rumik 0.2.3
File Size Uploaded Provenance Actions
livekit_plugins_rumik-0.2.3.tar.gz 24.6 kB Without provenance Details for livekit_plugins_rumik-0.2.3.tar.gz

Built distribution (wheel)

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

Total release size: 52.6 kB

Release files / livekit_plugins_rumik-0.2.3.tar.gz

Download URL livekit_plugins_rumik-0.2.3.tar.gz
Size 24.6 kB
Tags Source
SHA-256 checksum
How to use checksums
214f5d11a94ef9b0b7ce92143b42cd81b4040eddbe01fc3e356ae6d7a7154420
BLAKE2b-256 checksum
How to use checksums
cabecd69ede2913bb300d5b7cc92e6b2ea408cb80ed55e17b14bfea686c8d164
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15

Release files / livekit_plugins_rumik-0.2.3-py3-none-any.whl

Download URL livekit_plugins_rumik-0.2.3-py3-none-any.whl
Size 28.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7358d01de5b54e0639be46cb50518816396b341ac3881b853b6cbb265843ef09
BLAKE2b-256 checksum
How to use checksums
177c4d28397b8f51315079f05772631e42310c0e7905445a76713d099740cbbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.15

Security for livekit-plugins-rumik 0.2.3

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.2.3 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