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

# AssemblyAI

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

AssemblyAI is a **text-to-speech** plugin. It streams low-latency speech from one session for the whole call, in English, Spanish, German, Italian, Portuguese, and French, plus your own cloned voices.

## Setup

Set your AssemblyAI API key in the worker environment. Generate a key from the [AssemblyAI site](https://www.assemblyai.com/dashboard/docs/your-api-key):

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

## Usage

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

```python Python theme={null}
from zeroruntime.plugins import AssemblyAITTS

tts = AssemblyAITTS()

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

> [!NOTE]
>
> `AssemblyAITTS` ships in the Python SDK only. The Node JS SDK does not include this plugin yet.

> [!NOTE]
>
> `AssemblyAITTS` requires a `zeroruntime` release newer than 0.1.9.

## Parameters

*Constructor parameters for `AssemblyAITTS`.*

| Parameter | Type | Default | Description |
| - | - | - | - |
| `api_key` | `str` | `None` | AssemblyAI API key. Falls back to the `ASSEMBLYAI_API_KEY` environment variable when unset. |
| `model` | `str` | `"assemblyai-tts-1"` | TTS model. |
| `voice_id` | `str` | `"aai-jane"` | Voice slug or ID from the AssemblyAI catalog, or a cloned voice. Built-in voices such as the default start fastest, because they are always loaded. |
| `language` | `str \| None` | `None` | English name of the language to speak: "english", "spanish", "german", "italian", "portuguese" or "french". Leave unset to speak the voice's own language. AssemblyAI does not detect it from the text. |
| `region` | `str` | `"US"` | Data zone, "US" or "EU". Use the one nearest the agent, and the same one as AssemblyAISTT. Ignored when base\_url is set. |
| `base_url` | `str \| None` | `None` | Streaming host override, e.g. "wss\://tts.eu.assemblyai.com". Overrides region. |

## Import paths

| SDK | Import | Constructor |
| - | - | - |
| Python | `from zeroruntime.plugins import AssemblyAITTS` | `AssemblyAITTS()` |

Synthesized audio is streamed back to the caller after the [LLM](https://docs.zeroruntime.ai/runtime-sdk/plugins/overview.md) produces a response.

## Inference

This provider also runs through the [Inference Gateway](https://docs.zeroruntime.ai/runtime-sdk/plugins/inference/zero-runtime.md) on your Zero Runtime auth token, with no AssemblyAI API key. Import `AssemblyAITTS` from `zeroruntime.inference` instead of `zeroruntime.plugins`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.