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

# Camb AI

> Use the Camb AI text-to-speech plugin in a Zero Runtime pipeline. Setup and usage in Python.

Camb AI is a **text-to-speech** plugin. It synthesizes the LLM's reply into natural-sounding
speech via the CambAI MARS TTS API.

## Setup

Set your Camb AI API key in the worker environment. Generate a key from the [Camb AI studio](https://studio.camb.ai/):

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

## Usage

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

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

tts = CambAITTS()

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

## Parameters

| Parameter     | Type          | Default      | Description                                                                                                                                |
| ------------- | ------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `api_key`     | `str \| None` | `None`       | CambAI API key. Falls back to the `CAMBAI_API_KEY` environment variable when unset.                                                        |
| `voice`       | `int`         | `147320`     | Integer voice identifier from the CambAI voice catalog. Numeric IDs can be retrieved from the CambAI dashboard or the voices API endpoint. |
| `model`       | `str`         | `"mars-pro"` | CambAI TTS model name. `"mars-pro"` is the primary MARS 8 high-quality model.                                                              |
| `sample_rate` | `int`         | `24000`      | PCM output sample rate in Hz.                                                                                                              |

Synthesized audio is streamed back to the caller after the
[LLM](/plugins/overview) produces a response.
