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

# Groq

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

Groq is a **text-to-speech** plugin. It synthesizes the LLM's reply into natural-sounding
speech via Groq's low-latency inference API.

## Setup

Set your Groq API key in the worker environment. Generate a key from the [Groq console](https://console.groq.com/keys):

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

## Usage

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

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

tts = GroqTTS()

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

## Parameters

| Parameter         | Type          | Default          | Description                                                                                                                                                                                                                                                                              |
| ----------------- | ------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `api_key`         | `str \| None` | `None`           | Groq API key. Falls back to the `GROQ_API_KEY` environment variable when unset.                                                                                                                                                                                                          |
| `model`           | `str`         | `"playai-tts"`   | TTS model identifier. Options include `"playai-tts"` (PlayAI Dialog, English), `"playai-tts-arabic"` (PlayAI Dialog, Arabic), `"canopylabs/orpheus-v1-english"` (Orpheus English with vocal direction support), and `"canopylabs/orpheus-arabic-saudi"` (Orpheus Arabic, Saudi dialect). |
| `voice`           | `str`         | `"Fritz-PlayAI"` | Voice identifier used for synthesis. For `"playai-tts"`, example voices include `"Fritz-PlayAI"`, `"Aaliyah-PlayAI"`, and `"Adelaide-PlayAI"`. For the Orpheus English model, available voices include `"troy"`, `"hannah"`, `"austin"`, `"diana"`, `"autumn"`, and `"daniel"`.          |
| `speed`           | `float`       | `1.0`            | Speaking speed multiplier.                                                                                                                                                                                                                                                               |
| `response_format` | `str`         | `"wav"`          | Audio container format for the returned audio.                                                                                                                                                                                                                                           |
| `sample_rate`     | `int`         | `24000`          | Output audio sample rate in Hz.                                                                                                                                                                                                                                                          |

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