is elevenlabs v3 model supported?
# ask-ai
m
is elevenlabs v3 model supported?
t
Thanks for reaching out, AI. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Great news! LiveKit does support the ElevenLabs v3 model. You can easily use it by setting the
model
parameter to
"eleven_v3"
when you initialize the ElevenLabs TTS service in the
TTS()
constructor. Here’s a quick example:
Copy code
from livekit.plugins.elevenlabs import tts

eleven_tts = tts.TTS(
    model="eleven_v3",
    voice=...
)
This way, you get to tap into ElevenLabs' awesome text-to-speech features right within your voice apps built on the LiveKit Agents framework. If you need any help setting it up, just let me know! Sources: livekit-plugins/livekit-plugins-elevenlabs/README.md | ElevenLabs integration guide | LiveKit Docs
m
2025-08-22 133321,984 - DEBUG livekit.agents - http_session(): creating a new httpclient ctx 2025-08-22 133322,556 - WARNING livekit.agents - failed to synthesize speech, retrying in 0.1s {"tts": "livekit.plugins.elevenlabs.tts.TTS", "attempt": 1, "streamed": true} Traceback (most recent call last): File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 357, in _main_task await self._run(output_emitter) File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/plugins/elevenlabs/tts.py", line 355, in _run raise APIStatusError( livekit.agents._exceptions.APIStatusError: Invalid response status (status_code=403, request_id=9546c57297a1, body=None, retryable=False) 2025-08-22 133322,660 - WARNING livekit.agents - failed to synthesize speech, retrying in 2.0s {"tts": "livekit.plugins.elevenlabs.tts.TTS", "attempt": 2, "streamed": true} Traceback (most recent call last): File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 368, in _main_task raise APIError(f"no audio frames were pushed for text: {self._pushed_text}") livekit.agents._exceptions.APIError: no audio frames were pushed for text: Hello! I'm here to help you with whatever you need. How can I assist you today? (body=None, retryable=True) 2025-08-22 133324,663 - WARNING livekit.agents - failed to synthesize speech, retrying in 2.0s {"tts": "livekit.plugins.elevenlabs.tts.TTS", "attempt": 3, "streamed": true} Traceback (most recent call last): File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 368, in _main_task raise APIError(f"no audio frames were pushed for text: {self._pushed_text}") livekit.agents._exceptions.APIError: no audio frames were pushed for text: Hello! I'm here to help you with whatever you need. How can I assist you today? (body=None, retryable=True) 2025-08-22 133326,668 - ERROR livekit.agents - Error in _tts_inference_task Traceback (most recent call last): File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 529, in anext val = await self._event_aiter.__anext__() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ StopAsyncIteration During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs return await fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/opentelemetry/util/_decorator.py", line 71, in async_wrapper return await func(*args, **kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/agents/voice/generation.py", line 212, in _tts_inference_task async for audio_frame in tts_node: File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/agents/voice/agent.py", line 408, in tts_node async for ev in stream: File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 532, in anext raise exc # noqa: B904 ^^^^^^^^^ File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/opentelemetry/util/_decorator.py", line 71, in async_wrapper return await func(*args, **kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/tdmg/Documents/Personal_proj/Livekit-agents-test/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 368, in _main_task raise APIError(f"no audio frames were pushed for text: {self._pushed_text}") livekit.agents._exceptions.APIError: no audio frames were pushed for text: Hello! I'm here to help you with whatever you need. How can I assist you today? (body=None, retryable=True)
t
It looks like the errors you’re running into are related to authentication and input setup for the ElevenLabs TTS integration. No worries—here’s a straightforward way to get things back on track: 1. Fix APIStatusError 403 This usually means there’s an issue with your API credentials. Double-check that your API key is set up properly: • Make sure you’ve set the
ELEVEN_API_KEY
environment variable or pass the key directly when you initialize the TTS service:
Copy code
import os
from livekit.plugins import elevenlabs

# Option 1: Set environment variable
os.environ["ELEVEN_API_KEY"] = "your_api_key_here"

# Option 2: Pass directly in code
tts = elevenlabs.TTS(api_key="your_api_key_here")
Also, take a peek at your ElevenLabs dashboard to confirm your API key is active and correct. 2. Fix APIError: no audio frames were pushed This happens when no audio data comes through. Here’s what to check: • Make sure your text input isn’t empty and is valid:
Copy code
stream.push_text("Hello! This is valid text.")
stream.end_input()
• Double-check that your
voice_id
and
model
are right. You can use
list_voices()
to see what’s available:
Copy code
voices = await tts.list_voices()
print(voices)
• If you’re using
enable_ssml_parsing=True
, verify your SSML isn’t malformed. • If network lag might be causing issues, try increasing the `inactivity_timeout`:
Copy code
tts = elevenlabs.TTS(inactivity_timeout=600)
3. General Best Practices • It’s a good idea to enable retry logic with
APIConnectOptions
to make your integration more robust:
Copy code
from livekit.agents import APIConnectOptions

tts = elevenlabs.TTS(
    conn_options=APIConnectOptions(max_retry=3, timeout=5)
)
• Try testing with a simple text input to help isolate any issues:
Copy code
tts = elevenlabs.TTS()
stream = tts.synthesize("Hello")
audio = await stream.collect()
If you’re still stuck after trying these steps, feel free to reach out—I’m here to help you get this working smoothly! Sources: livekit-plugins/livekit-plugins-resemble/livekit/plugins/resemble/tts.py | ElevenLabs TTS integration guide | LiveKit Docs