brief-book-57365
11/18/2025, 4:23 PMtall-airline-16756
11/18/2025, 4:24 PMtall-airline-16756
11/18/2025, 4:24 PMbrief-book-57365
11/18/2025, 4:32 PMtall-airline-16756
11/18/2025, 4:32 PMuv add "livekit-agents[elevenlabs]~=1.2" (Python)
pnpm add @livekit/agents-plugin-elevenlabs@1.x (Node.js)
2. Set Authentication:
Make sure to provide your ElevenLabs API key by setting the ELEVEN_API_KEY environment variable in your .env file. This helps keep your credentials safe!
3. Enable SSML Parsing:
When you create the TTS instance, just set enable_ssml_parsing=True (Python) or enableSsmlParsing: true (Node.js). Here's how it looks:
Python:
`from livekit.plugins import elevenlabs
tts_instance = elevenlabs.TTS(
voice_id="ODq5zmih8GrVes37Dizd",
model="eleven_multilingual_v2",
enable_ssml_parsing=True
)`*Node.js:*
import * as elevenlabs from '@livekit/agents-plugin-elevenlabs';
const ttsInstance = new elevenlabs.TTS({
voice: { id: "ODq5zmih8GrVes37Dizd" },
modelID: "eleven_multilingual_v2",
enableSsmlParsing: true
});
4. Use SSML in Text Input:
Simply include SSML tags like <prosody>, <break>, or <emphasis> in your text. The plugin will beautifully interpret these to enhance the speech output.
If you have any questions or need a hand with anything else, please don’t hesitate to reach out. I’m here to help!
Sources: ElevenLabs TTS plugin guide | LiveKit Docs | livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/__ini... | README.md