Hey everyone :wave: I’ve been testing the LiveKit ...
# ask-ai
s
Hey everyone 👋 I’ve been testing the LiveKit ElevenLabs plugin and ran into an issue using the new ElevenLabs v3 TTS model. Here’s my setup:
Copy code
from livekit.plugins import (
    deepgram,
    openai,
    cartesia,
    elevenlabs,
    silero,
    noise_cancellation,
)

session = AgentSession(
    turn_detection=EnglishModel(),
    vad=silero.VAD.load(),
    stt=deepgram.STT(model="nova-3"),
    llm=openai.LLM(model="gpt-4o-mini"),
    # tts=deepgram.TTS(model="aura-asteria-en"),
    tts=elevenlabs.TTS(
        voice_id="Xb7hH8MSUJpSbSDYk0k2",
        model="eleven_multilingual_v2"
    )
)
This setup works perfectly with
eleven_multilingual_v2
, but when I switch the TTS model to
eleven_v3
, it stops working. Has anyone successfully used ElevenLabs v3 with the LiveKit plugin yet? Would love to know if it’s currently supported or if there’s a workaround/config update needed. Thanks in advance
t
Thanks for reaching out, viknesh. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Could you please share the specific error message or issue you’re experiencing when switching to the ElevenLabs v3 TTS model? For instance, are you noticing an error in the logs, or is the audio output not coming through? Understanding this will really help us get to the bottom of the problem together. Sources: livekit-plugins/livekit-plugins-elevenlabs/livekit/plugins/elevenlabs/__ini... | examples/src/raw_function_description.ts | Troubleshooting & Common Issues | livekit/livekit_composite | DeepWiki
s
Traceback (most recent call last): File "/Users/VikneshDF/Projects/outbound-caller-python/venv/lib/python3.9/site-packages/livekit/agents/tts/tts.py", line 383, in _main_task await self._run(output_emitter) File "/Users/VikneshDF/Projects/outbound-caller-python/venv/lib/python3.9/site-packages/livekit/plugins/elevenlabs/tts.py", line 375, in _run raise APIConnectionError("could not connect to ElevenLabs") from e livekit.agents._exceptions.APIConnectionError: could not connect to ElevenLabs (body=None, retryable=True) {"tts": "livekit.plugins.elevenlabs.tts.TTS", "attempt": 3, "streamed": true, "pid": 60358, "job_id": "AJ_TaD3YSzYPnpk"} 2025-10-22 014910,258 - ERROR livekit.agents - Error in _tts_inference_task Traceback (most recent call last): File "/Users/VikneshDF/Projects/outbound-caller-python/venv/lib/python3.9/site-packages/livekit/plugins/elevenlabs/tts.py", line 369, in _run connection = await asyncio.wait_for( File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/tasks.py", line 481, in wait_for return fut.result() File "/Users/VikneshDF/Projects/outbound-caller-python/venv/lib/python3.9/site-packages/livekit/plugins/elevenlabs/tts.py", line 250, in current_connection await conn.connect() File "/Users/VikneshDF/Projects/outbound-caller-python/venv/lib/python3.9/site-packages/livekit/plugins/elevenlabs/tts.py", line 525, in connect self._ws = await self._session.ws_connect(url, headers=headers) File "/Users/VikneshDF/Projects/outbound-caller-python/venv/lib/python3.9/site-packages/aiohttp/client.py", line 1084, in _ws_connect raise WSServerHandshakeError( aiohttp.client_exceptions.WSServerHandshakeError: 403, message='Invalid response status', url='wss://api.elevenlabs.io/v1/text-to-speech/Xb7hH8MSUJpSbSDYk0k2/multi-stream-input?model_id=eleven_v3&output_format=mp3_22050_32&enable_ssml_parsing=false&enable_logging=true&inactivity_timeout=180&apply_text_normalization=auto&sync_alignment=true&auto_mode=true'
t
The error you're seeing usually points to an authentication or connection hiccup with the ElevenLabs API. Let's work through some steps together to get this sorted: • Verify API Key: Please double-check that your ElevenLabs API key is entered correctly. You can add it directly in your code or set it through the
ELEVEN_API_KEY
environment variable. • Check API Key Permissions: Make sure your API key has the right permissions to access the ElevenLabs v3 TTS model. • Validate Model Configuration: Confirm that your setup specifies the model as
"eleven_v3"
. • Network Connectivity: Try connecting to
https://api.elevenlabs.io/v1
to rule out any network issues. • Timeout Settings: If needed, consider adjusting the timeout settings in your configuration. If you’re still running into trouble after these steps, a helpful next move is to test your API key directly with ElevenLabs' API. This can help confirm if the key is valid and check if any usage limits might be affecting you. I'm here to help if you need any more guidance!