Skip to main content
Voice Activity Detection (VAD) automatically detects speech in audio streams, enabling hands-free voice interfaces.

Overview

VAD determines when a user is speaking vs. silent, which is essential for:
  • Knowing when to start/stop recording
  • Triggering transcription at the right time
  • Building push-to-talk or hands-free interfaces
The SDK provides energy-based VAD with Silero VAD for accurate speech detection.

Automatic VAD with Voice Session

The easiest way to use VAD is through the Voice Agent pipeline:

VoiceSessionConfig for VAD

Building a Voice Level Indicator

Voice Session with VAD Events

VAD Tuning Tips

Lower thresholds (0.01) detect quieter speech but may trigger on background noise. Higher thresholds (0.1) require louder speech but are more robust to noise.
Shorter duration (0.5s) feels more responsive but may cut off pauses mid-sentence. Longer duration (2.0s) allows natural pauses but feels slower.
Consider measuring ambient noise level and adjusting threshold dynamically.

See Also

Voice Agent

Complete voice pipeline

Speech-to-Text

Audio transcription