Skip to main content
Voice Activity Detection (VAD) identifies speech in audio streams, enabling hands-free voice interfaces and efficient audio processing by filtering out silence.

Overview

VAD answers the question: “Is someone speaking right now?” This enables:
  • Wake word detection – Start listening when speech begins
  • Audio trimming – Only process speech segments
  • Turn-taking – Know when to respond in conversations
  • Battery efficiency – Don’t process silence

Basic Usage

Setup

VADConfiguration

Threshold Tuning

Detection Methods

From AVAudioPCMBuffer

From Float Array

Continuous VAD with Callbacks

For real-time applications, use the callback-based API:

Complete Voice Recording Example

SwiftUI Voice Activity UI

VAD State Management

Best Practices

Start with 0.5 and adjust based on testing. Noisy environments need higher thresholds.
Add a small delay before acting on speech end events to handle brief pauses.
Configure AVAudioSession appropriately to handle interruptions.
Always call cleanupVAD() when done to free resources.

Error Handling

Voice Agent

Build complete voice experiences with VAD + STT + LLM + TTS →