calm-notebook-48535
08/12/2025, 4:38 PMtall-airline-16756
08/12/2025, 4:38 PMtall-airline-16756
08/12/2025, 4:39 PMUSER_STARTED_SPEAKING
and USER_STOPPED_SPEAKING
events from the VPAEvent
enum. These handy events are powered by Voice Activity Detection (VAD).
Here’s a simple way to set it up:
• Just subscribe to these events in your app like this:
agentSession.on('user_started_speaking', () => {
console.log('User has started speaking');
});
agentSession.on('user_stopped_speaking', () => {
console.log('User has stopped speaking');
});
• LiveKit uses Silero's VAD to catch when speech begins and ends, so you get reliable results.
With this, you'll be able to smoothly track when users are chatting, making your app feel more natural and responsive.
Sources: VPAEvent | LiveKit Agents | Turn detection and interruptions | LiveKit Docs | agents/src/pipeline/human_input.ts | Speech & Audio Processing | livekit/livekit_composite | DeepWiki