LiveKit docs › Build Agents › Partner spotlight › Google › Gemini TTS

---

# Gemini TTS plugin guide

> How to use the Gemini TTS plugin for LiveKit Agents.

Available in (BETA):
- [x] Node.js
- [x] Python

- **[Use in Agent Builder](https://cloud.livekit.io/projects/p_/agents/builder/new?tts=google%2Fgemini-3.8-flash-tts)**: Create a new agent in your browser using google/gemini-3.8-flash-tts

## Overview

This plugin allows you to use [Gemini TTS](https://ai.google.dev/gemini-api/docs/speech-generation) as a TTS provider for your voice agents.

### Installation

Install the plugin from PyPI:

**Python**:

```shell
uv add "livekit-agents[google]~=1.8"

```

---

**Node.js**:

```shell
pnpm add @livekit/agents-plugin-google@1.x

```

### Authentication

Credentials must be provided by one of the following methods:

- For Vertex AI, you must set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the path of the service account key file. For more information about mounting files as secrets when deploying to LiveKit Cloud, see [File-mounted secrets](https://docs.livekit.io/deploy/agents/secrets.md#file-mounted-secrets).
- To use Gemini API: Set the `api_key` argument or the `GOOGLE_API_KEY` environment variable.

### Usage

Use a Gemini TTS in an `AgentSession` or as a standalone speech generator. For example, you can use this TTS in the [Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md).

**Python**:

```python
from livekit.agents import AgentSession
from livekit.plugins import google

session = AgentSession(
    tts=google.beta.GeminiTTS(
        model="gemini-3.8-flash-tts",
        voice_name="Zephyr",
        instructions="Speak in a friendly and engaging tone.",
    ),
    # ... llm, stt, etc.
)

```

---

**Node.js**:

```typescript
import * as google from '@livekit/agents-plugin-google';
import { voice } from '@livekit/agents';

const session = new voice.AgentSession({
    tts: new google.beta.TTS({
        model: 'gemini-3.8-flash-tts',
        voiceName: 'Zephyr',
        instructions: 'Speak in a friendly and engaging tone.',
    }),
    // ... llm, stt, etc.
});

```

### Parameters

This section describes some of the available parameters. See the plugin reference links in the [Additional resources](#additional-resources) section for a complete list of all available parameters.

- **`model`** _(string)_ (optional) - Default: `gemini-3.1-flash-tts-preview`: The model to use for speech generation. For a list of models, see [Supported models](https://ai.google.dev/gemini-api/docs/speech-generation#supported-models).

- **`voice_name`** _(string)_ (optional) - Default: `Kore`: The prebuilt voice used to synthesize speech. For supported voices, see [Voice options](https://ai.google.dev/gemini-api/docs/speech-generation#voices). In Node.js this parameter is called `voiceName`.

- **`instructions`** _(string)_ (optional): Prompt to control the style, tone, accent, and pace. To learn more, see [Controlling speech style with prompts](https://ai.google.dev/gemini-api/docs/speech-generation#controllable). Defaults to `Say the text with a proper tone, don't omit or add any words`.

- **`customPronunciations`** _(CustomPronunciations)_ (optional): Available in:
- [x] Node.js
- [ ] Python

Pronunciation instructions for the Gemini model. Pass an object with a `pronunciations` array, where each entry specifies a `phrase`, `pronunciation`, and optional `phoneticEncoding`. These instructions are formatted as prompt text sent to the Gemini model alongside the speech generation request.

```typescript
const tts = new google.beta.TTS({
    model: 'gemini-3.8-flash-tts',
    voiceName: 'Aoede',
    customPronunciations: {
        pronunciations: [
            {
                phrase: 'LiveKit',
                pronunciation: 'Live Kit',
            },
            {
                phrase: 'gRPC',
                pronunciation: 'gee arr pee see',
                phoneticEncoding: 'IPA', // optional
            },
        ],
    },
});

```

## Expressive mode

Gemini's `gemini-3.8-flash-tts` and `gemini-3.8-flash-lite-tts` work with [expressive mode](https://docs.livekit.io/agents/models/tts/expressive.md), where the LLM marks up its replies and LiveKit renders the delivery. Gemini sets an emotional tone, adjusts pacing, inserts pauses, and produces non-verbal sounds such as laughs and sighs. It also publishes the current mood as the `lk.expression` attribute for your frontend.

Turn it on with `expressive=True` on your `AgentSession`. To adjust the delivery, see [Customization](https://docs.livekit.io/agents/models/tts/expressive.md#customization).

## Additional resources

The following resources provide more information about using Gemini TTS with LiveKit Agents.

- **[Expressive mode](https://docs.livekit.io/agents/models/tts/expressive.md)**: Let the LLM add emotion, pacing, and non-verbal sounds to Gemini speech automatically.

- **[Gemini TTS docs](https://ai.google.dev/gemini-api/docs/speech-generation)**: Gemini Developer API docs for TTS.

- **[Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md)**: Get started with LiveKit Agents and Gemini TTS.

- **[Google ecosystem guide](https://docs.livekit.io/agents/integrations/google.md)**: Overview of the entire Google AI and LiveKit Agents integration.

---

This document was rendered at 2026-12-04T02:07:58.249Z.
For the latest version of this document, see [https://docs.livekit.io/agents/models/tts/gemini.md](https://docs.livekit.io/agents/models/tts/gemini.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).