Skip to main content
Voice Activity Detection (VAD) identifies speech segments in audio streams, enabling responsive voice interfaces.

Basic Usage

VADResult

Configure VAD

Customize detection sensitivity:

VADConfiguration

Streaming VAD

Process continuous audio with Kotlin Flows:

Calibrate with Ambient Noise

Improve accuracy by calibrating with ambient noise:

Example: Voice Recording with VAD

VAD Statistics

Get current VAD performance metrics:

Reset VAD

Clear VAD state for a fresh start:

Best Practices

Calibration: Always calibrate VAD with ambient noise for best results in noisy environments.Threshold tuning:
  • Quiet environment: threshold = 0.3-0.5
  • Noisy environment: threshold = 0.6-0.8
Buffer management: Use VAD to determine when to start/stop recording, but buffer audio slightly before speech detection for complete captures.