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

# Gemini

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

Gemini is a **text-to-speech** plugin. It uses Gemini TTS models with your Gemini API key: expressive voices whose delivery you steer with a plain-language style instruction. For Google Cloud Text-to-Speech, see [Google TTS](https://docs.zeroruntime.ai/runtime-sdk/plugins/tts/google.md).

## Setup

Set your Gemini API key in the worker environment. Generate a key from the [Gemini site](https://aistudio.google.com/apikey):

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

## Usage

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

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

tts = GeminiTTS()

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

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

## Parameters

*Constructor parameters for `GeminiTTS`.*

| Parameter | Type | Default | Description |
| - | - | - | - |
| `api_key` | `str` | `None` | Gemini API key. Falls back to the `GOOGLE_API_KEY` environment variable when unset. |
| `model` | `str` | `"gemini-3.8-flash-tts"` | Gemini TTS model, e.g. "gemini-3.8-flash-tts", "gemini-3.8-flash-lite-tts" (fastest) or "gemini-2.5-flash-preview-tts". |
| `voice` | `str` | `"Kore"` | Prebuilt voice name, e.g. "Kore", "Puck", "Charon" or "Zephyr". |
| `style` | `str \| None` | `None` | Plain-language instruction for how to speak, e.g. "cheerful and friendly" or "calm and slow". |

## Import paths

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

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 Gemini API key. Import `GeminiTTS` from `zeroruntime.inference` instead of `zeroruntime.plugins`.


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