narrow-chef-71655
11/04/2025, 8:59 AMtall-airline-16756
11/04/2025, 8:59 AMtall-airline-16756
11/04/2025, 9:01 AMroom.on(RoomEvent.TrackSubscribed, (track, publication, participant) => {
if (publication.kind === Track.Kind.Audio && track.kind === Track.Kind.Audio) {
// Start playback (SDK handles it), or attach manually:
const el = document.createElement('audio');
el.autoplay = true;
track.attach(el);
document.body.appendChild(el);
}
});
More on subscribing: Subscribing to tracks
If you need raw audio for processing (agents/server-side):
• Wrap the subscribed audio track with an AudioStream and iterate `AudioFrame`s for processing.
Docs and patterns: Processing raw media tracks and Capturing the first seconds of a call
Would you like a snippet for your specific environment (browser, React, or agent/backend)?
Sources: Rooms, participants, and tracks | LiveKit docs | Core Platform Architecture & Authentication | livekit/livekit_composite | D... | Subscribing to tracks | LiveKit docs | Capturing the First Few Seconds of a Call for Processing | How to set a fixed participant for agent audio processingnarrow-chef-71655
11/04/2025, 10:05 AMtall-airline-16756
11/04/2025, 10:07 AMAudioStream and iterate `AudioFrame`s.
References:
• Overview of rooms/participants/tracks: docs
• Capturing/processing audio frames server-side: guide
If you share which backend SDK you’re using (Node, Python, Go, etc.), I can provide the exact event name and a minimal code snippet.
Sources: Rooms, participants, and tracks | LiveKit docs | Capturing the First Few Seconds of a Call for Processing | Camera & microphone | LiveKit Docs | An open source stack for real-time multimodal AI | Live Conversations with AI using ChatGPT and WebRTCnarrow-chef-71655
11/04/2025, 10:17 AMtall-airline-16756
11/04/2025, 10:19 AM