---
title: "LiveKit"
description: "Drop Bodhi into the TTS slot of a LiveKit Agents voice agent."
---

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

# LiveKit

[LiveKit Agents](https://docs.livekit.io/agents/) builds realtime voice agents
around an `AgentSession`. Bodhi provides the text-to-speech stage as a standard
LiveKit `tts.TTS` provider — audio streams out as it is generated, and an
interruption cancels it mid-utterance.

## Install

```bash
pip install "livekit-plugins-bodhi"
```

Needs livekit-agents 1.0 or newer. Verified against 1.8.6.

> **Uninstall bodhi-sdk first**
>
> `livekit-plugins-bodhi` depends on `bodhi-api-sdk`, which installs a module
> named `bodhi`. The older `bodhi-sdk` installs the same module, so the two
> cannot be installed side by side. Run `pip uninstall bodhi-sdk` first if you
> have it.

## Add it to a session

```python
from livekit.agents import AgentSession
from livekit.plugins import bodhi

session = AgentSession(
# ... stt, vad, llm
tts=bodhi.TTS(
    voice="bhavana",
    language="hi",
),
)
```

`api_key` is read from `$BODHI_API_KEY` when omitted, and `base_url` defaults to
`https://tts.navana.ai`. Everything else has a default.

## Arguments

| Argument | Required | Description |
| --- | --- | --- |
| `api_key` | No | Your platform API key, sent as the `Authorization: Bearer` and `x-api-key` headers. Falls back to `$BODHI_API_KEY`. |
| `voice` | No | Voice id. Defaults to `default_female`. See [Voices and languages](/text-to-speech/voices). |
| `language` | No | Language to synthesize in, as a two-letter code (`hi`, `gu`, `en`, …). Defaults to Hindi. |
| `sample_rate` | No | Output rate in Hz: `8000`, `16000` or `24000`. Defaults to `24000`. |
| `base_url` | No | Override the endpoint, usually to point at a different deployment. Defaults to `https://tts.navana.ai`. |
| `use_fast` | No | Use the distilled model where one is available. Faster, slightly lower quality. |
| `num_step` | No | Flow-matching steps, `1` to `100`. Higher is slower and cleaner. Omit for the voice's own default. |
| `guidance_scale` | No | Classifier-free guidance. Omit for the voice's own default. |

## How it maps onto LiveKit

Audio is produced as `SynthesizedAudio` frames, which is the contract every
LiveKit TTS plugin follows. Because the audio flows through the session, an
interruption cancels the utterance in progress rather than letting it play to
the end, so barge-in works the same as with any other provider.

Sentences are sent as they arrive from the LLM, and the first audio comes back
while the rest is still being synthesized.

## Related

- [Python SDK](/text-to-speech/streaming) — Using the SDK directly, without LiveKit.
- [Voices and languages](/text-to-speech/voices) — Every voice, and the languages they speak.
- [Speech-to-text with LiveKit](/speech-to-text/livekit) — The other half of the agent.

Source: https://docs.navana.ai/text-to-speech/livekit/index.mdx
