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

# Azure

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

Azure is a **text-to-speech** plugin. It synthesizes the LLM's text response into natural-sounding speech using Azure Neural TTS voices.

## Setup

Set your Azure Speech resource key in the worker environment. Create a Speech resource and key in the [Azure portal](https://portal.azure.com/):

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

## Usage

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

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

tts = AzureTTS()

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

## Parameters

| Parameter       | Type            | Default               | Description                                                                                                                                                                                                                                                                                           |
| --------------- | --------------- | --------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `speech_key`    | `Optional[str]` | `None`                | Azure Speech resource subscription key. Falls back to the `AZURE_SPEECH_KEY` environment variable when unset.                                                                                                                                                                                         |
| `speech_region` | `Optional[str]` | `None`                | Azure region identifier for the Speech resource (e.g. `"eastus"`, `"westeurope"`, `"southeastasia"`). Falls back to the `AZURE_REGION` environment variable, then `"eastus"` if that is also unset. Must match the region where your Azure Speech resource was created, since keys are region-scoped. |
| `voice`         | `str`           | `"en-US-JennyNeural"` | Azure Neural TTS voice name in `"<locale>-<Name>Neural"` format. Common options include `"en-US-AriaNeural"`, `"en-US-GuyNeural"`, `"en-GB-SoniaNeural"`, `"fr-FR-DeniseNeural"`, `"de-DE-KatjaNeural"`, `"ja-JP-NanamiNeural"`.                                                                      |
| `sample_rate`   | `int`           | `24000`               | PCM output sample rate in Hz. Azure Neural TTS natively supports `24000` (standard) and `48000` (high-fidelity).                                                                                                                                                                                      |

The synthesized audio is streamed back to the caller as the [LLM](/plugins/llm/google) produces its response.
