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

# Inworld AI

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

Inworld AI is a **text-to-speech** plugin. It synthesizes the LLM's reply into natural-sounding
speech via Inworld AI's realtime, low-latency voice API.

## Setup

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

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

## Usage

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

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

tts = InworldAITTS()

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

## Parameters

| Parameter     | Type          | Default           | Description                                                                                                                                                                                                                                              |
| ------------- | ------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api_key`     | `str \| None` | `None`            | Inworld AI API key. Falls back to the `INWORLDAI_API_KEY` environment variable when unset.                                                                                                                                                               |
| `voice_id`    | `str`         | `"Hades"`         | Voice identifier for synthesis. Use any voice ID from the Inworld AI voice library (e.g. `"Hades"`, `"Sarah"`), or a custom voice UUID obtained from the voice cloning endpoint. Voice IDs are consistent across the TTS API and the Inworld Playground. |
| `model_id`    | `str`         | `"inworld-tts-1"` | TTS model to use. Options include `"inworld-tts-1.5-max"` (optimized for quality) and `"inworld-tts-1.5-mini"` (\~120 ms median latency, optimized for speed).                                                                                           |
| `sample_rate` | `int`         | `24000`           | Output audio sample rate in Hz. Supports values in the range 8000-48000 Hz.                                                                                                                                                                              |

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