# Voice Activity Detection

> The Voice Activity Detection (VAD) is a technique that detects when a person is speaking in an audio stream.

## What is voice activity detection (VAD)?

The technique that separates speech from silence and noise in audio. Voice apps use it to start and stop sending audio, save costs and detect when the user started or finished speaking.

- Topic: Voice AI
- Type: technique

## Example

Wrong:

```js
recorder.ondataavailable = (e) => {
  socket.send(e.data);
};
```

Right:

```js
recorder.ondataavailable = (e) => {
  if (vad.isSpeech(e.data)) socket.send(e.data);
};
```

Skipping chunks that VAD marks as silence saves bandwidth and model cost and avoids noise being transcribed.

## Key points

- The silence threshold is configurable and tested with background noise.
- Audio is not sent to the speech model while VAD reports silence.

## Interview questions

### What is the difference between VAD and turn detection?

VAD only says whether someone is speaking right now. Turn detection uses VAD and often the words themselves to decide if the user has finished their turn.

### Can VAD run in the browser?

Yes, small VAD models run in the browser with WebAssembly or an audio worklet, so silence is filtered before audio is sent to the server.

### Why does VAD trigger on background noise?

The threshold is too sensitive or the model was not tested with real noise. Raise the threshold, add noise suppression and test with recordings from real users.

## Related cards

- [Turn Detection](https://wonderium.dev/ai/turn-detection.md)
- [Barge-In](https://wonderium.dev/ai/barge-in.md)
- [Speech-to-Text](https://wonderium.dev/ai/speech-to-text.md)

---

- Level: [Artificial Intelligence](https://wonderium.dev/ai.md)
- HTML version: https://wonderium.dev/ai/voice-activity-detection
- Last updated: 2026-11-25
