enough-match-43171
02/19/2026, 6:54 PMtall-airline-16756
02/19/2026, 6:54 PMtall-airline-16756
02/19/2026, 6:54 PMlivekit.agents._exceptions.APIError: no audio frames were pushed for text. I don’t have a direct cause for that exact error available, so I’ll need a bit more context to diagnose and give a concrete fix. I can guide you through likely areas to check and then troubleshoot further once you share details.
To help me reproduce and diagnose, please share the following:
1. What part of the Agents API is raising this error?
◦ Are you using a built-in pipeline agent (TTS pipeline, STT pipeline, conversation agent), or a custom agent/node?
1. The code path that triggers the error
◦ The minimal code snippet that calls the API or pushes audio frames (or the sequence of API calls).
◦ If possible, include where you create the audio source / TTS call and where you push frames.
1. Runtime details and full stack trace
◦ The full exception stack trace (not just the single line).
◦ Any logs around the time the error appears.
1. Audio/TTS specifics
◦ Are you using LiveKit’s TTS models or a third-party TTS? Which model?
◦ How are audio frames generated (microphone capture, file, TTS output)?
◦ Format and sampling details (sample rate, channels, PCM float/int16).
1. AudioSource / queue configuration
◦ If you’re using an AudioSource or similar, what are your queue_size_ms and related settings?
◦ Any recent changes to those settings or to network/latency behavior.
1. Repro steps and frequency
◦ Does the error happen for every request, only when sending certain text, or intermittently?
◦ Can you reliably reproduce it with a short example text?
Quick things to check while you gather that info
• Ensure your pipeline actually pushes audio frames before/after the TTS call returns (TTS must produce frames that get queued).
• Verify the TTS step produced non-empty audio (filesize > 0, duration > 0).
• Confirm audio format matches what LiveKit expects (sample rate, mono/stereo).
• If you’re converting or resampling audio, validate the conversion isn’t producing silent frames or dropping frames.
• Look at the audio queue behavior: if queue_size_ms is too small, frames might be dropped before they’re consumed.
What I’ll do after you reply
• If you share the code snippet + stack trace I’ll point to the exact line/step likely failing and give a targeted fix.
• If it’s a configuration/audio-format issue I’ll show the precise sample-rate/format expectations and an example conversion.
• If it’s related to TTS producing no output, I’ll give steps to validate the TTS output and integrate it into the agent pipeline correctly.
If you prefer, paste the minimal failing code and stack trace here and I’ll walk through it line-by-line.
Sources: Text and transcriptions | LiveKit Documentation | Text-to-speech (TTS) models overview | LiveKit Documentation | Resolving "InvalidState - failed to capture frame" errors in AudioSource | ...enough-match-43171
02/19/2026, 6:55 PMtall-airline-16756
02/19/2026, 6:56 PMqueue_size_ms or other AudioSource settings you’re using (if applicable).
1. Repro details:
◦ Does this happen for every text string, or only certain inputs?
◦ Can you reproduce it with a very short text (e.g., “hello”)?
1. Environment:
◦ Are you running the agent pipeline locally, in a container, or on a cloud VM?
◦ Any recent changes (library upgrades, network, or config changes)?
Quick checks you can try immediately
• Verify TTS produced non-empty audio (file size > 0 and playback is audible).
• If Vertex returns encoded audio (MP3/OGG/WAV), decode to raw PCM and confirm sample rate and channels match what LiveKit expects.
• Increase the queue_size_ms on your AudioSource if you use one — small queues can drop frames before they’re consumed.
• Log the number of frames/bytes you push after TTS; if it’s zero, the TTS step didn’t produce audio.
• Confirm you’re pushing audio frames to the same session/stream the agent expects (no wrong stream/ID mismatch).
What I’ll do once you share the items above
• Identify whether the problem is: TTS returning no audio, audio-format mismatch, conversion dropping frames, or the agent’s audio queue dropping frames.
• Give exact code fixes (conversion example, sample rate settings, queue_size_ms tweak) and a minimal reproducible example you can run.
Paste your minimal code + stack trace and I’ll walk through it line-by-line and propose a concrete fix.
Sources: Google Cloud TTS integration guide | LiveKit Documentation | Pipeline nodes and hooks | LiveKit Documentation | examples/voice_agents | livekit/livekit_composite | DeepWiki | Resolving "InvalidState - failed to capture frame" errors in AudioSource | ... | Resolving "InvalidState - failed to capture frame" errors in AudioSourceenough-match-43171
02/19/2026, 6:56 PMtall-airline-16756
02/19/2026, 6:57 PMqueue_size_ms so your TTS audio frames have more buffer and are less likely to be dropped.
What to change
• Set queue_size_ms when you create the AudioSource used to push TTS audio frames.
• Start with a larger value (e.g., 1000–2000 ms) and increase incrementally if you still see dropped frames.
Python example
from livekit import rtc
audio_source = rtc.AudioSource(
sample_rate=44100, # match your TTS output sample rate
num_channels=1, # mono or 2 for stereo depending on your audio
queue_size_ms=2000 # increase buffer to 2000ms
)
Notes and tips
• Minimum allowed value is 10 ms. For streaming/synthesized TTS you’ll typically want 1000–2000 ms.
• Make sure your TTS output sample rate and channel count match the AudioSource settings (mismatch can effectively produce "no frames").
• Push frames asynchronously and log the number/size of frames you push to confirm non-zero audio is being queued.
• If you still see the error after increasing the queue, paste the code that pushes frames and the full stack trace and I’ll help pinpoint the next step.
If you tell me which language/SDK you’re using (Python, Node, etc.) I can give a snippet for that environment.
Sources: Resolving "InvalidState - failed to capture frame" errors in AudioSource | Resolving "InvalidState - failed to capture frame" errors in AudioSource | ... | Text-to-speech (TTS) models overview | LiveKit Documentation