> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rumik.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# build a voice agent with livekit

> drop rumik into a livekit agent with livekit-plugins-rumik-ai.

building on [livekit agents](https://docs.livekit.io/agents/)? use
[`livekit-plugins-rumik-ai`](https://pypi.org/project/livekit-plugins-rumik-ai/),
our official livekit TTS plugin. it drops rumik straight into an `AgentSession`
with streaming audio and interruption handling already wired up.

```bash theme={null}
pip install livekit-plugins-rumik-ai
```

set your key from the dashboard:

```bash theme={null}
export RUMIK_API_KEY="rk_live_•••••••••"
```

## add it to an agent

the `TTS` class plugs into a livekit `AgentSession` next to your STT and LLM:

```python theme={null}
from livekit.agents import AgentSession
from livekit.plugins import rumik_ai

# muga: expressive, tone-tagged hinglish
session = AgentSession(
    stt=...,   # your speech-to-text plugin
    llm=...,   # your llm plugin
    tts=rumik_ai.TTS(model="muga"),
)
```

steer mulberry with a natural-language description, or pin a preset speaker:

```python theme={null}
# mulberry: description-driven voice
tts = rumik_ai.TTS(
    model="mulberry",
    description="a female 30s hindi voice, warm timbre, conversational pacing, like a podcast host",
)

# or pin a named studio voice. description still goes with it.
tts = rumik_ai.TTS(
    model="mulberry",
    description="a female 30s hindi voice, warm timbre, conversational pacing, like a podcast host",
    speaker="ira",
)
```

## constructor options

| argument                    | applies to | notes                                                                                                        |
| --------------------------- | ---------- | ------------------------------------------------------------------------------------------------------------ |
| `model`                     | both       | `"muga"` or `"mulberry"`. default `"muga"`.                                                                  |
| `api_key`                   | both       | defaults to the `RUMIK_API_KEY` environment variable.                                                        |
| `base_url`                  | both       | defaults to `https://silk-api.rumik.ai`.                                                                     |
| `full_response_aggregation` | both       | buffer the full reply before synthesis. default `True` for muga, `False` for mulberry.                       |
| `tone`                      | muga       | fallback tone when the input text has no `[tone]` marker.                                                    |
| `description`               | mulberry   | required. natural-language voice description.                                                                |
| `speaker`                   | mulberry   | optional. a named voice, e.g. `"ira"`. send `description` too. see [preset voices](/mulberry#preset-voices). |

it also accepts the shared sampling params (`temperature`, `top_p`, `top_k`,
`repetition_penalty`, `max_new_tokens`).

<Note>
  muga aggregates the full tagged reply before speaking (`full_response_aggregation`
  is `True` by default), so it never tries to synthesize a half-tagged sentence.
  see [prompting muga](/prompting-muga) for why.
</Note>

## which model?

* **muga** for short, expressive reactions you steer with `[tone]` tags. see
  [prompting muga](/prompting-muga).
* **mulberry** for low-latency conversational agents you steer with a
  `description`. see [prompting mulberry](/prompting-mulberry).

prefer a full walkthrough? the [livekit cookbook](/cookbook/voice-agent-livekit)
builds a working voice agent from scratch. or hand your coding agent the
[rumik TTS skill](/agent-skill) so it wires all of this up on the first try.
