Skip to main content
Voice Activity Detection (VAD) runs on every audio frame before STT. It determines whether the caller is speaking, emits interruption signals for barge-in, and sends speech activity heartbeats that keep the End of Speech timer from firing during active speech. All three VAD providers run locally using ONNX or native C libraries. No external API calls, no credentials, no added latency.

VAD Interface

Every provider implements the Vad interface:
Input audio is always 16 kHz LINEAR16 mono — the platform’s internal format. Resampling from 8 kHz telephony audio happens upstream before VAD sees it.

Factory Function

The factory reads microphone.vad.provider from the assistant’s audio options and returns the matching implementation. If no provider is set, Silero VAD is used as the default.

Provider Identifiers


Shared Parameters

All three providers use the same configuration keys:

Model Files

VAD models are bundled in the Docker image at build time. For source builds, models are resolved from the source tree relative to each provider’s Go package directory.

Docker

Models are copied into the runtime image and referenced via environment variables:
TEN VAD uses a native shared library instead of an ONNX model:
These are set automatically in the Dockerfile — no manual configuration needed when running via Docker Compose.

From Source

When running go run cmd/assistant/assistant.go, each provider resolves its model path using runtime.Caller to find the source directory: Silero and FireRed models are checked into the repository. TEN VAD requires the shared library to be installed or available in LD_LIBRARY_PATH / DYLIB_LIBRARY_PATH. To override model paths, set the environment variables:

CGO Dependencies

All VAD providers use CGO for inference: The Docker base image (rapidaai/rapida-golang) includes all CGO dependencies pre-installed. For local source builds, you need ONNX Runtime and the TEN VAD shared library installed on your system.

Providers

See the VAD concepts guide for detailed parameter tuning guidance and use-case recommendations.