I am trying elevenlabs free tier with livekit but ...
# ask-ai
s
I am trying elevenlabs free tier with livekit but its not woking meanwhile for same config it was working for a different account with subscription. is this cause of free tier?
t
Thanks for reaching out, Gurkirat. 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 this. You’re asking whether ElevenLabs’ free tier could be the reason your LiveKit integration works with a subscribed account but not with the free account — and yes, that’s the most likely cause. What’s happening • ElevenLabs’ free tier has stricter limits (rate limits, concurrency caps, and lower priority) than paid plans. Those limits can cause requests to be throttled, queued, or rejected, which looks like the integration “not working” even when your configuration is correct. • LiveKit forwards your requests to ElevenLabs using the API key you supply. LiveKit does not block functionality based on ElevenLabs account tier, so failures are usually due to ElevenLabs rejecting or throttling requests on their side. What you can check right now • Inspect the logs where LiveKit sends ElevenLabs requests and look for HTTP status codes or error messages returned from ElevenLabs (for example 429 rate-limit responses). • Compare request frequency / concurrency between the working (subscribed) account and the failing (free) account—higher request volume will trigger free-tier limits faster. • Try a low-frequency test (one request at a time, minimal payload) with the free account to see if it succeeds intermittently; consistent failures point to rate or access restrictions. Next steps I can help with • Help you collect and interpret the specific error codes or log lines from LiveKit so we can confirm it’s rate-limiting or another ElevenLabs error. • Suggest ways to reduce request rate or add retry/backoff logic to make the integration more tolerant of throttling. • If you want consistent, production-grade behavior, I can outline what to expect from a paid ElevenLabs plan versus the free tier and how to test after upgrading. Which of the above would you like to do next? If you can paste any error messages or log snippets (redact any secrets), I’ll help diagnose them. Sources: Terms of Service | LiveKit | ElevenLabs TTS plugin guide | LiveKit Documentation | ElevenLabs STT plugin guide | LiveKit Documentation
s
how can i debug this as there is no elevenlabs specific error in logs getting
Copy code
01:00:35 │ ERROR │ spacy.agents.voice │ TTS node error for agent Axis Bank: no audio frames were pushed for text: I'm here to help you. Could you please tell me what assistance you need with your Axis Bank card today? (body=None, retryable=True)
Traceback (most recent call last):
  File "/Users/kietsukishima/Desktop/Limechat/spacy_server/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 622, 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/kietsukishima/Desktop/Limechat/spacy_server/app/services/agents/voice/_factory.py", line 675, in tts_node
    async for frame in Agent.default.tts_node(self, adjust_pronunciation(text), model_settings):
  File "/Users/kietsukishima/Desktop/Limechat/spacy_server/.venv/lib/python3.12/site-packages/livekit/agents/voice/agent.py", line 448, in tts_node
    async for ev in stream:
  File "/Users/kietsukishima/Desktop/Limechat/spacy_server/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 625, in __anext__
    raise exc  # noqa: B904
    ^^^^^^^^^
  File "/Users/kietsukishima/Desktop/Limechat/spacy_server/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 413, in _traceable_main_task
    await self._main_task()
  File "/Users/kietsukishima/Desktop/Limechat/spacy_server/.venv/lib/python3.12/site-packages/livekit/agents/tts/tts.py", line 458, 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: I'm here to help you. Could you please tell me what assistance you need with your Axis Bank card today? (body=None, retryable=True)
t
Thanks — this is a helpful log. I’m responding to your question about how to debug the “no audio frames were pushed” error when there’s no ElevenLabs-specific error in the logs. Below is a focused, step-by-step debugging plan you can follow to isolate whether the problem is with ElevenLabs, the LiveKit TTS plugin, or the agent pipeline. 1) Quick isolation test — run ElevenLabs TTS outside the agent • Purpose: determine if ElevenLabs returns audio frames at all for this account. • Action: run a minimal standalone TTS stream using the ElevenLabs plugin (example shown below). If this returns frames, the provider is working and the issue is downstream in the agent/publishing logic. If it returns no frames, ElevenLabs is the likely cause (auth, model/voice, or account limits). • Minimal test (async Python pseudo-code):
Copy code
from livekit.plugins import elevenlabs
import asyncio

async def test_tts():
    tts = elevenlabs.TTS(model="eleven_multilingual_v2", voice_id="21m00Tcm4TlvDq8ikWAM")
    stream = tts.stream()
    async def input_task():
        stream.push_text("Hello")
        await stream.aclose_input()
    async def output_task():
        async for chunk in stream:
            print("received chunk", type(chunk))
    await asyncio.gather(input_task(), output_task())

asyncio.run(test_tts())
• What to watch for: any returned audio frames or provider-side errors; HTTP/WS error codes; 429’s (rate limit). 2) Check credentials, model and voice IDs • Ensure your ElevenLabs API key environment variable is set (e.g.,
ELEVEN_API_KEY=...
). A missing/invalid key can cause silent failures. • Confirm the
model
and
voice_id
you’re using are valid for that account. Some voice IDs or custom/cloned voices are not available to free tier or via certain endpoints. • If possible, test a well-known public voice ID (e.g.,
21m00Tcm4TlvDq8ikWAM
) and a common model like
eleven_multilingual_v2
. 3) Turn on debug logging to capture more details • Set Python logging to DEBUG before starting the agent:
Copy code
import logging
logging.basicConfig(level=logging.DEBUG)
• Look specifically for SynthesizeStream / WebSocket connection logs,
push_text
/
flush
/
end_input
calls, and any provider HTTP/WS response codes. Capture timestamps to correlate events. 4) Inspect for rate-limits or throttling • Free-tier accounts commonly have stricter rate limits or concurrency caps. If ElevenLabs is throttling, you may see intermittent behavior or no frames when requests are dropped. • Look for 429 responses or short-lived connections in debug logs. If you see none, continue isolating. 5) Validate text input and SSML • Try a very small, plain input like "Hello" with no punctuation/emojis or SSML. • If you use SSML, ensure
enable_ssml_parsing=True
(if applicable). Broken SSML or unsupported characters sometimes cause synthesis to abort with no frames. 6) Confirm AudioSource / queue sizing in the LiveKit pipeline • The agent error indicates the TTS stream ended without any pushed frames. It can also happen if frames are produced but dropped due to small capture queue or buffer overflow. • Ensure your AudioSource
queue_size_ms
is large enough (e.g., 1000–2000 ms) so frames aren’t dropped before publishing. • Watch for “failed to capture frame” warnings in logs; they indicate downstream frame capture/publishing issues. 7) Try a controlled low-frequency run • Send only one TTS request at a time, wait until it finishes, then send another. If the free account is being throttled under concurrency, single-request tests may succeed. • This also helps determine whether the problem is burst/concurrency vs. per-request auth/config. 8) If standalone test returns frames but agent still fails • Trace the agent’s
tts_node
flow: ◦ Confirm
stream.push_text()
is being called and
aclose_input()
is reached. ◦ Confirm the agent consumes the stream and publishes a
LocalAudioTrack
/ calls
capture_frame
. ◦ Add debug prints/logging around where frames are handled/published to see if they appear and where they stop. • Check RoomOptions — ensure audio output is enabled when starting the session (otherwise publishing may be suppressed). What I can help you with next • If you run the standalone test and paste the debug output (redact API keys), I’ll look for provider responses, HTTP/WS codes, or other signs of throttling. • If standalone returns frames but the agent still fails, paste the additional debug snippets around
push_text
, frame handling, and any AudioSource warnings and I’ll help pinpoint the pipeline step dropping audio. If you want, start with the standalone test result and any debug logs you get after enabling DEBUG logging — paste them here and I’ll help interpret them. Sources: ElevenLabs TTS plugin guide | LiveKit Documentation | ElevenLabs TTS | LiveKit Documentation | Resolving "InvalidState - failed to capture frame" errors in AudioSource | ... | Text-to-speech (TTS) models overview | LiveKit Documentation | Resolving "InvalidState - failed to capture frame" errors in AudioSource