lively-terabyte-73999
03/27/2026, 2:58 AMtall-airline-16756
03/27/2026, 2:58 AMtall-airline-16756
03/27/2026, 2:59 AMaudio_output=true vs audio_output=false.)
◦ If audio_output=false the agent will not publish an audio track and RoomComposite will not capture spoken audio.
1. Check published tracks during the call
◦ Can you list participants/tracks from the server while reproducing the issue and confirm whether the agent’s audio track is present the whole time? If the agent’s audio track disappears in the room, that explains the missing audio in egress.
1. Egress type and layout
◦ Are you using RoomCompositeEgress (browser-rendered composite) or a track-based egress (TrackComposite/TrackEgress)? RoomComposite relies on what the browser renders; track-based egress records raw tracks directly and is more reliable for capturing an agent’s audio.
◦ If you use a custom layout/template, confirm the template includes the agent participant and does not mute/exclude their audio.
1. Timing and logs
◦ When the audio cuts out: does it always happen after the same duration? If so, what is the timestamp in the call/recording when silence begins?
◦ Any relevant logs from the egress service, browser headless instance, or the agent session around the time audio cuts out?
1. Quick workaround options
◦ Enable agent TTS audio (audio_output=true) so the agent publishes an audio track into the room, which RoomComposite can capture.
◦ Use TrackCompositeEgress or TrackEgress targeted at the agent’s audio track to record raw audio (recommended for reliable archival/compliance recordings).
If you can share:
• The agent session configuration (showing the audio_output value),
• Which egress type you’re using (RoomComposite vs TrackComposite/TrackEgress),
• One timestamp when the silence begins and any egress logs around that time —
I’ll use those details to give specific next steps (including exact checks or configuration snippets) to resolve this quickly.
Sources: Universal Egress | LiveKit | How to build an agent with speech-to-text input and text-only output | Live... | Text and transcriptions | LiveKit Documentation | sip | livekit/livekit_composite | DeepWiki | examples/bank-ivr | livekit/livekit_composite | DeepWiki, with interactive elementslively-terabyte-73999
03/27/2026, 3:08 AMtall-airline-16756
03/27/2026, 3:08 AMaudio_output=true, the agent’s audio track stays published per session analytics, you’re using TrackComposite egress, and the cutout is intermittent (no fixed duration). I’ll help narrow this down.
What I’m responding to
• Your agent remains publishing audio, but the TrackComposite recording intermittently loses the agent’s audio while the SIP user and Twilio still have it.
What to check next (these are targeted diagnostics that help pinpoint where the loss is happening)
1. Confirm the Track IDs used by egress
◦ Which track ID(s) did you supply to the TrackComposite egress for the agent audio? If egress targets the wrong track or a track instance that gets replaced during the session, the egress file can lose that audio mid-call.
◦ Please share the track ID from session analytics at a time when audio is present and one from when it’s silent.
1. Verify track lifetime vs. track replacement
◦ Some clients republish audio tracks (new track IDs) during the call (e.g., on reconnect or device change). TrackComposite records the specific track ID(s) you give it and will not automatically follow a republished track.
◦ Can you confirm whether the agent client ever republished or re-created its LocalAudioTrack during the session? Server-side logs or participant track lists over time can show that.
1. Check egress worker logs for warnings/errors
◦ Look for any warnings or errors from the TrackComposite worker around the time audio drops (e.g., subscription failures, encoding errors, or track-not-found messages).
◦ If you can paste a short excerpt of the egress worker logs around a drop event, I can help interpret them.
1. Confirm subscriptions and participant routing
◦ Even if the track is published, the egress worker must subscribe to it. Verify the egress process remained subscribed to the agent’s audio track for the entire session (subscription state changes appear in server logs/analytics).
◦ If you have server-side events showing subscription/unsubscription for the egress worker, please share them.
1. Reproduce with a focused test
◦ Start a short test call where you:
i. Start TrackComposite targeting the agent’s current audio track ID.
ii. Have the agent speak intermittently and, if possible, intentionally trigger a reconnect or device change.
iii. Note the exact times when audio appears in the room vs. when it disappears in the recorded file.
◦ Provide the timestamps and the egress logs collected for that test.
Immediate workarounds
• If the agent may republish audio tracks, use a small controller to: detect new agent audio track IDs and restart or update the TrackComposite egress to point to the new track ID. This ensures the egress follows the active audio.
• As an alternative, consider running a Room-level track egress (subscribe to the participant rather than a single track ID) or a continuous mixer approach if you need resilience to track replacement.
If you can share any of the following, I’ll give precise next steps:
• The track ID(s) you provided to TrackComposite and a corresponding agent track ID timeline from analytics.
• Relevant egress worker log excerpts around a drop event (timestamped).
• Any client-side events indicating repro or track republish/replacement.
Once you share those, I’ll help identify whether egress lost the subscription, was pointed at a replaced track, or hit an encoding/worker issue — and give exact config or code changes to resolve it.
Sources: Universal Egress | LiveKit | Agents (Python) | livekit/livekit_composite | DeepWiki | Why is there extra audio at the end of my recordings of an agent session? |..., with interactive elementslively-terabyte-73999
03/27/2026, 3:17 AMtall-airline-16756
03/27/2026, 3:17 AM