Skip to main content

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.

Available inPython
|
Node.js

Overview

This plugin allows you to use ElevenLabs  as a TTS provider for your voice agents.

Installation

Install the plugin from PyPI:

uv add "livekit-agents[elevenlabs]~=1.5"
pnpm add @livekit/agents-plugin-elevenlabs@1.x

Authentication

The ElevenLabs plugin requires an ElevenLabs API key .

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.

from livekit.plugins import elevenlabs
session = AgentSession(
tts=elevenlabs.TTS(
voice_id="ODq5zmih8GrVes37Dizd",
model="eleven_multilingual_v2"
)
# ... llm, stt, etc.
)
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 section for a complete list of all available parameters.

modelstringDefault: eleven_turbo_v2_5

ID of the model to use for generation. To learn more, see the ElevenLabs documentation .

voice_idstring

ID of the voice to use for generation. Browse the available voices in the ElevenLabs voice library , or use a custom or community voice from your own account. To learn more, see the ElevenLabs documentation .

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

voice_settingsVoiceSettings

Voice configuration. stability and similarity_boost are required when you pass this object. To learn more, see the ElevenLabs documentation .

  • stability
    Required
    float
  • similarity_boost
    Required
    float
  • stylefloat
  • use_speaker_boostbool
  • speedfloat
languageLanguageCode

Language code 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 .

enable_ssml_parsingboolDefault: false

Enable Speech Synthesis Markup Language (SSML) parsing for input text. Set to true to customize pronunciation using SSML.

chunk_length_schedulelist[int]

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  in the ElevenLabs docs.
  • For prompting techniques that incorporate these tags into agent responses, see 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.

Additional resources

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