LiveKit docs › Build Agents › Models › TTS › Additional models › ElevenLabs

---

# ElevenLabs TTS plugin guide

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

> ⚠️ **ElevenLabs is retired from LiveKit Inference**
> 
> LiveKit Inference no longer serves ElevenLabs models. The retirement took effect on August 31, 2026. This plugin still works with your own ElevenLabs account. To stay on LiveKit Inference, switch to one of the [other TTS providers](https://docs.livekit.io/agents/models/tts.md).

Available in:
- [x] Node.js
- [x] Python

## Overview

This plugin allows you to use [ElevenLabs](https://elevenlabs.io/) as a TTS provider for your voice agents.

### Installation

Install the plugin from PyPI:

**Python**:

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

```

---

**Node.js**:

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

```

### Authentication

The ElevenLabs plugin requires an [ElevenLabs API key](https://elevenlabs.io/app/settings/api-keys).

Set `ELEVEN_API_KEY` in your `.env` file.

### Usage

Use ElevenLabs TTS within 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.plugins import elevenlabs

session = AgentSession(
   tts=elevenlabs.TTS(
      voice_id="ODq5zmih8GrVes37Dizd",
      model="eleven_multilingual_v2"
   )
   # ... llm, stt, etc.
)

```

---

**Node.js**:

```typescript
import * as elevenlabs from '@livekit/agents-plugin-elevenlabs';

const session = new voice.AgentSession({
    tts: new elevenlabs.TTS({
      voiceId: "ODq5zmih8GrVes37Dizd",
      model: "eleven_multilingual_v2"
    }),
    // ... llm, stt, etc.
});

```

### Parameters

This section describes some of the parameters you can set when you create an ElevenLabs TTS. See the plugin reference links in the [Additional resources](#additional-resources) section for a complete list of all available parameters.

- **`model`** _(string)_ (optional) - Default: `eleven_turbo_v2_5`: ID of the model to use for generation. To learn more, see the [ElevenLabs documentation](https://elevenlabs.io/docs/api-reference/text-to-speech/convert#/docs/api-reference/text-to-speech/convert#request.body.model_id).

- **`voice_id`** _(string)_ (optional): ID of the voice to use for generation. Browse the available voices in the [ElevenLabs voice library](https://elevenlabs.io/app/default-voices), or use a custom or community voice from your own account. To learn more, see the [ElevenLabs documentation](https://elevenlabs.io/docs/api-reference/text-to-speech/convert).

The default voice differs between SDKs: `hpp4J3VqNfWAUOO0d1Us` in Python and `bIHbv24MWmeRgasZH58o` in Node.js. Set this explicitly to pin a voice.

- **`voice_settings`** _(VoiceSettings)_ (optional): Voice configuration. `stability` and `similarity_boost` are required when you pass this object. To learn more, see the [ElevenLabs documentation](https://elevenlabs.io/docs/api-reference/text-to-speech/convert#request.body.voice_settings).

- - **`stability`** _(float)_:
- - **`similarity_boost`** _(float)_:
- - **`style`** _(float)_ (optional):
- - **`use_speaker_boost`** _(bool)_ (optional):
- - **`speed`** _(float)_ (optional):

- **`language`** _(LanguageCode)_ (optional): [Language code](https://docs.livekit.io/agents/models/tts.md#language-codes) for the output audio. If not set, the model default applies. Models that don't support a language override ignore it. To learn more, see the [ElevenLabs documentation](https://elevenlabs.io/docs/api-reference/text-to-speech/convert#request.body.language_code).

- **`enable_ssml_parsing`** _(bool)_ (optional) - Default: `false`: Enable Speech Synthesis Markup Language (SSML) parsing for input text. Set to `true` to [customize pronunciation](#customizing-pronunciation) using SSML.

- **`chunk_length_schedule`** _(list[int])_ (optional): Schedule of chunk sizes, in characters, that controls when audio is flushed during streaming. Each value must be between `50` and `500`. If not set, the ElevenLabs default of `[120, 160, 250, 290]` applies.

Setting this turns off `auto_mode`, which is otherwise enabled and synthesizes one sentence at a time.

## SSML and audio tags

ElevenLabs supports SSML and audio tags for more natural-sounding speech, including custom pronunciation, pauses, non-verbal sounds, and emotional delivery. SSML tags require `enable_ssml_parsing=true`.

- For custom pronunciation of specific words with SSML `phoneme` tags, see [Pronunciation](https://elevenlabs.io/docs/best-practices/prompting#pronunciation) in the ElevenLabs docs.
- For prompting techniques that incorporate these tags into agent responses, see [Voice realism](https://docs.livekit.io/agents/start/prompting.md#voice-realism) in the prompting guide.

## Transcription timing

ElevenLabs TTS supports aligned transcription forwarding, which improves transcription synchronization in your frontend. Set `use_tts_aligned_transcript=True` in your `AgentSession` configuration to enable this feature. To learn more, see [the docs](https://docs.livekit.io/agents/build/text.md#tts-aligned-transcriptions).

## Additional resources

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

- **[ElevenLabs docs](https://elevenlabs.io/docs)**: ElevenLabs TTS docs.

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

---

This document was rendered at 2026-12-03T23:16:27.689Z.
For the latest version of this document, see [https://docs.livekit.io/agents/models/tts/elevenlabs.md](https://docs.livekit.io/agents/models/tts/elevenlabs.md).

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