future-ocean-83972
12/19/2025, 5:02 PMtall-airline-16756
12/19/2025, 5:02 PMtall-airline-16756
12/19/2025, 5:03 PMBuiltinAudioClip.OFFICE_AMBIENCE) or only your custom audio source/generator? 2) Did anything change recently (code/agent/sdk version, deployment, file paths, or network environment)? 3) Is the problem consistent or intermittent? If intermittent, how often does it occur? 4) If using a custom generator or play() with AudioConfig, can you share the relevant snippet (or describe whether it performs blocking I/O or long-running work before yielding frames)? 5) Any other relevant worker logs around the same timestamp (connection drops, high latency, or CPU spikes)?
Immediate things you can try now:
• If using a custom generator: ensure it yields rtc.AudioFrame promptly and does not perform blocking file reads or heavy CPU work inside the generator. Offload blocking work (file reads, decoding) to a background task and have the generator yield frames quickly.
• Test with a built-in clip (e.g., BuiltinAudioClip.OFFICE_AMBIENCE) to see if playback works; if built-ins play, the issue is in your custom source.
• Confirm the agent session and room connection are stable at the time playback starts (check room join/leave and network errors in logs).
• Restart the worker process briefly to rule out a stuck async task, then retry playback.
• If the source is a remote stream or file, verify the source is available and responds quickly.
Tell me the answers to 1–4 (and paste the small code snippet if possible). With that I’ll provide the exact code checks/fixes to stop the generator timing out.
Sources: Agent speech and audio | LiveKit docs