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

# Papla

> Use the Papla text-to-speech plugin in a Zero Runtime pipeline.

Papla is a **text-to-speech** plugin. It turns the LLM's reply into audio the caller
hears.

## Setup

Set your Papla API key in the worker environment. Generate a key from the [Papla Media site](https://papla.media/):

```bash theme={null}
export PAPLA_API_KEY=<key>
```

## Usage

Import the plugin and pass it to the pipeline's `tts` slot.

```python theme={null}
from zrt.plugins import PaplaTTS

tts = PaplaTTS()

# Pipeline(tts=tts, ...)
```

## Parameters

| Parameter     | Type          | Default      | Description                                                                                                                  |
| ------------- | ------------- | ------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| `api_key`     | `str \| None` | `None`       | Papla API key. Falls back to the `PAPLA_API_KEY` environment variable when unset.                                            |
| `model_id`    | `str`         | `"papla_p1"` | TTS model identifier, also used as the voice ID for the synthesis request. Defaults to the P1 ultra-realistic English model. |
| `sample_rate` | `int`         | `24000`      | Output audio sample rate in Hz.                                                                                              |

Spoken replies support interruptions. When the caller talks over the agent, the runtime
stops the audio and listens again. See the [plugins overview](/plugins/overview) for how TTS fits into the rest of the pipeline.
