Is there any problem with elevenlabs api? I am usi...
# ask-ai
f
Is there any problem with elevenlabs api? I am using but i am getting request timeout error?
t
Thanks for reaching out, Snehal. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m sorry you’re running into request timeouts with ElevenLabs. I can help troubleshoot. A few clarifying questions first so I can narrow this down: 1. What is the exact error message and HTTP status code (if any) you see? 2. Are the timeouts consistent on every request or intermittent? 3. What endpoint / model and request size are you using (short TTS text vs. long transcript)? 4. Where is your code running (local machine, cloud region, specific VM/container type)? 5. Are you using the ElevenLabs plugin through LiveKit Agents or calling ElevenLabs directly from your app? 6. Do you see any signs of network issues or CPU throttling where your process runs (e.g., high latency spikes, dropped packets, or throttled CPU)? Things you can try right away (quick checks): • Retry the request with a slightly longer client timeout to rule out transient slowness. • Test a very short request (a few words) to see if small calls succeed. • Try the same ElevenLabs call from a different network/location (e.g., your laptop vs. server) to isolate network vs. service issues. • If using LiveKit Agents, confirm your ElevenLabs API key is correctly configured and that the agent process has enough CPU and network throughput — high processing latency can cause apparent timeouts. • Check for rate limiting: reduce request frequency briefly to see if errors stop. If you send the answers to the questions above (especially the exact error and whether you’re using LiveKit Agents or direct ElevenLabs calls), I’ll suggest the next targeted steps and configuration checks. If helpful, I can also point you to the ElevenLabs TTS/STT plugin guides for LiveKit and a troubleshooting article about latency/timeouts in agent environments. Sources: ElevenLabs TTS plugin guide | LiveKit Documentation | ElevenLabs STT plugin guide | LiveKit Documentation | Troubleshooting Latency and Timeout Errors with Turn Detection on AWS
f
1- error messge - if i use default voice and model - packages/livekit/agents/tts/tts.py", line 463, 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! This is Reeva. Thank you for your interest in the AI/ML Engineer position. I'd like to conduct a brief technical screening with you today. Is this a good time to talk? (body=None, retryable=True) error message - if use other voice or model - RequestAPI time out error 2- consistent 3-message are long like one or two sentence 4- my code is on local machine agent on livekit cloud 5-livekit-elevenlabs-plugins 6-No
t
Thanks — this is very helpful detail. I’ll walk through what’s going on with each error and give concrete steps to try next. Acknowledging your two errors • When using the default voice/model you get: livekit.agents._exceptions.APIError: no audio frames were pushed for text: "Hello! This is Reeva..." This means the ElevenLabs TTS call returned no audio frames for that input and the agent treats that as an error. • When using other voices/models you get a RequestAPI timeout error. • These errors are consistent, your messages are one–two sentences long, you run the agent locally while using the livekit-elevenlabs plugin, and you do not see local network/CPU issues. Likely causes (short) • Some voice/model combinations can silently return no audio if the request input triggers a model-side failure (length, unsupported characters, or model limitations). • Non-default/custom voices or higher-quality models can take longer to generate audio; your client/agent may be timing out before audio is produced. • Running the agent locally while speaking to LiveKit Cloud adds network round trips that increase latency and make timeouts more likely. Actionable steps to try (in order) 1. Shorten and sanitize text ◦ Split long sentences into shorter chunks (1 short sentence per TTS request). ◦ Remove/escape unusual characters or long punctuation sequences. ◦ Test with a very short, simple sentence (e.g., "Hello, this is a test") to confirm basic functionality. 1. Increase allowed generation latency ◦ Increase the TTS streaming latency / timeout used by the plugin or agent. A small increase often resolves timeouts for higher-latency voices. ◦ Example: raise
streaming_latency
(or equivalent timeout) from the default to a larger value for the problematic model. 1. Add retry logic around
session.say()
(handles transient retryable errors) ◦ Retry a few times with short backoff before failing. Many transient API issues are resolved by 1–2 quick retries. 1. Test different voice/model IDs and verify availability ◦ Confirm the exact voice and model IDs are valid and available for your account. ◦ Try a known-good default voice first, then switch to the custom voice to isolate whether the voice itself is the issue. 1. Run a minimal direct ElevenLabs call (isolate LiveKit plugin) ◦ If possible, make the same ElevenLabs TTS request directly (outside the LiveKit plugin) from your local machine to see if ElevenLabs returns audio or times out. This helps determine whether the failure is on ElevenLabs’ side or in the plugin/agent interaction. 1. Reduce network latency where possible ◦ If tests show timeouts are related to network delays, try running the agent closer to LiveKit Cloud (same region) or ensure your local connection has stable, low latency. What to share next so I can dig deeper • Exact voice_id and model names you used for the requests that timed out. • The exact timeout/streaming_latency values configured (if you changed them). • A short example of the text that triggers the
no audio frames
error (you already shared one; if you can try an even shorter sentence that fails, include it). • Any plugin/agent logs immediately before the error (a few lines above the exception). That helps confirm whether the request was sent and whether ElevenLabs responded at all. If you prefer, try this quick checklist first: • Send a 3–5 word text with the default voice (confirm success). • If success, try the same short text with the custom voice/model. • If custom voice times out, increase streaming latency and retry. • Add a retry wrapper of 2 retries with 1s backoff and test again. I can provide exact code snippets for increasing latency, adding retries, or making a direct ElevenLabs request if you tell me: • which SDK/language you’re using for the agent (Python, Node, etc.), and • the voice_id and model you want to test. Sources: Pipeline nodes and hooks | LiveKit Documentation | examples/voice_agents | livekit/livekit_composite | DeepWiki | OpenAI and LiveKit partner to turn Advanced Voice into an API | Troubleshooting STT not picking up utterances | LiveKit | ElevenLabs TTS plugin guide | LiveKit Documentation
f
I have tried below simple code to generate the audio and its working but its not working in livekit agent.. from elevenlabs import ElevenLabs from elevenlabs.environment import ElevenLabsEnvironment client = ElevenLabs( environment=ElevenLabsEnvironment.PRODUCTION, api_key="" ) res = client.text_to_speech.convert( voice_id="E10xF3pTvG3ixlf2xSgr", output_format="mp3_44100_128", text="The first move is what sets everything in motion.", model_id="eleven_multilingual_v2" ) print(res)
t
Thanks — this is a very useful datapoint: direct ElevenLabs SDK calls work from your environment, but the same requests fail when routed through the LiveKit agent. I’ll focus on differences between the two paths and give targeted troubleshooting you can try next. Why direct SDK works but LiveKit agent can fail • The direct SDK call shows ElevenLabs will return audio for your voice/model and text, so the issue is likely in the agent/plugin path (configuration, timeouts, streaming chunking, or how the plugin expects/consumes audio frames). • LiveKit agents expect streaming audio frames from the TTS plugin. If ElevenLabs takes longer to produce the first audio frames or returns audio in an unexpected format/sequence, the agent can raise: ◦
no audio frames were pushed for text
(agent never received frames), or ◦ Request timeout (agent gave up waiting for audio). • The agent adds extra network/timeout constraints compared with a single direct SDK call. Targeted checks and fixes to try next 1. Confirm plugin uses the same request parameters ◦ Verify the voice_id, model_id, and output_format the LiveKit plugin is configured with exactly match your working direct call (
E10xF3pTvG3ixlf2xSgr
,
eleven_multilingual_v2
,
mp3_44100_128
). ◦ Small mismatches (different model name or unsupported output format) can change plugin behavior. 1. Increase agent/plugin timeouts / streaming latency ◦ The agent may use a shorter timeout than your direct SDK call. Increase the plugin’s streaming timeout or
streaming_latency
(or equivalent) so it waits longer for the first audio chunk. ◦ If you tell me which language/SDK you run the agent in (Python or Node), I can provide the exact setting and snippet to change. 1. Force small test payloads through the agent ◦ Even though your direct test used a short sentence, explicitly try a 3–5 word test phrase via the LiveKit agent to confirm whether any audio frames come through at all. ◦ If a very short phrase succeeds in the agent, then the issue is latency or chunking for longer/normal messages. 1. Capture and share plugin-level logs ◦ Look for the agent logs around the TTS call: lines showing the request being sent to ElevenLabs, first response bytes, or any error returned by the plugin’s HTTP client. ◦ Useful snippets: the HTTP response code and whether any body was returned, plus timestamps to see how long ElevenLabs took to respond. 1. Validate how the plugin consumes streamed audio ◦ Confirm the plugin expects raw PCM frames vs. encoded MP3/Opus. If the plugin expects stream of raw audio frames but the ElevenLabs call returns MP3 bytes, there may be an implicit transcoding/streaming mismatch. ◦ If the plugin has a config option for
output_format
or
encoding
, set it to the format the plugin expects. 1. Add retry and a small initial wait before streaming to agent ◦ Add a short pre-wait (100–300ms) or small retries for the first chunk in the agent plugin path—this can give ElevenLabs the small extra time it needs to produce initial audio frames. ◦ Implement a retry wrapper around the plugin call with 2 quick retries and a 1s backoff. 1. Test an inline minimal ElevenLabs HTTP request from the same host the agent runs on ◦ Run the same direct sample you provided from the exact environment the agent runs in (if different from your dev laptop). That confirms there are no network/proxy differences when the agent invokes ElevenLabs. What I can do next for you • If you share: ◦ which LiveKit Agents SDK/language you’re using (Python or Node), ◦ the LiveKit plugin TTS config (voice_id, model, any timeout or streaming config), ◦ a short excerpt of the agent logs around the failing TTS call (a few lines before and after the exception), I will provide: • exact config snippets to increase streaming latency/timeouts, • a small retry wrapper snippet tailored to your SDK, • a check-list to ensure encoding/format compatibility between ElevenLabs response and the plugin’s expected input. If you prefer, start by running this quick experiment and tell me results • In the same environment where the agent runs, run your working ElevenLabs snippet (the one you shared). • Then immediately run a 3–5 word TTS via the LiveKit agent. • Share the agent log lines and the timestamps for both actions. This will let me determine whether ElevenLabs is responding slower to agent-originated requests or the plugin is dropping frames. You’re close — because direct calls work we can focus on the agent’s timeout/format/streaming behavior. Tell me the SDK (Python/Node) and paste the agent TTS config/log snippet and I’ll give exact code changes to try.
f
Traceback (most recent call last): /lib/python3.10/site-packages/livekit/agents/tts/tts.py", line 463, 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! . Is this a good time to talk? (body=None, retryable=True) 142048.190 WARNI… livekit.agents failed to synthesize speech, retrying in 2.0s
t
Thanks — this is very helpful. I can see the agent is consistently raising
no audio frames were pushed for text
and then retrying. Because your direct ElevenLabs SDK call works, the problem is almost certainly in how the LiveKit agent/plugin is calling or waiting for ElevenLabs audio (timeout/streaming/chunking or format mismatch). Let’s focus on targeted steps you can try now and a few quick checks I need to narrow it down. What to try now (priority order) 1. Send a very short test phrase through the agent ◦ Use a 2–5 word phrase like "Hello, this is a test." ◦ If that succeeds in the agent, the problem is likely latency/streaming for longer text. If it fails, it points to a format or config mismatch. 1. Increase the agent/plugin streaming timeout/latency ◦ The agent is likely giving up before the first audio frame arrives. Increase whatever
streaming_latency
or TTS timeout the plugin exposes (even a small bump helps). ◦ If you tell me whether your agent is Python or Node I’ll give the exact snippet to change. 1. Break long text into short chunks before calling the agent ◦ Split a sentence into 1–2 shorter sentences and call
session.say()
(or equivalent) for each piece. This reduces time to first audio frame. 1. Add a short pre-wait or retry for the first audio chunk ◦ Add a tiny delay (100–300 ms) after the TTS request before expecting frames, or add a retry loop that retries the TTS call once after a 1s backoff. 1. Verify output encoding/format expected by the plugin ◦ Confirm whether the plugin expects raw PCM frames or encoded MP3/Opus and make sure your ElevenLabs
output_format
matches. A mismatch can make the agent see zero frames even when bytes are returned. 1. Run the exact direct ElevenLabs snippet from the same host the agent runs on ◦ You mentioned running the direct snippet locally; run the same snippet from the exact environment where the LiveKit agent runs (same machine/container). If it succeeds there but agent still fails, it confirms agent-side handling is the problem. What I need from you to give exact code/config fixes • Which agent SDK/language are you using? (Python or Node) • The plugin/agent TTS config you’re using (voice_id, model_id, any timeout or
streaming_latency
value) • A short agent log excerpt showing timestamps for: ◦ when the agent sends the request to ElevenLabs ◦ any HTTP response status (if present) or the time gap until the exception • The exact short test phrase you tried that failed (you shared one; if you can also try an even shorter one please include results) If you want immediate changes, tell me your SDK (Python/Node). I’ll provide: • The exact code/config lines to increase streaming latency or timeout. • A small retry wrapper and a chunking example to split long text. • A quick check to detect whether the plugin is receiving MP3/PCM and how to adjust the plugin config. You’re very close — because direct SDK calls work we can fix this by widening the agent’s wait window or matching the audio format. Tell me the SDK and paste your TTS config and a few log lines and I’ll give exact snippets to apply.