Voice activity detection (VAD)

Decibri ships two VAD implementations built in. No cloud API, no extra install, no separate model download.

What’s built in

  1. RMS energy detector (default). Fast, minimal CPU, works well for clean audio. Enable with { vad: true }. Defaults to vadMode: 'energy'.
  2. Silero v5 neural model (bundled). Significantly more accurate in noisy environments, background music, or multi-speaker scenarios. Enable with { vad: true, vadMode: 'silero' }.

Both run locally in Rust via ONNX Runtime. The Silero ONNX model (~2.3 MB) ships inside the decibri npm package. No separate download, no sherpa-onnx dependency.

Quick example

const Decibri = require('decibri');

// Default RMS detector. Fast, clean-audio use cases.
const micRms = new Decibri({ vad: true });

// Silero neural model. Better accuracy under noise / music / multi-speaker.
const micSilero = new Decibri({ vad: true, vadMode: 'silero' });

// Both emit the same events.
micSilero.on('speech',  () => console.log('[speech start]'));
micSilero.on('silence', () => console.log('[speech end]'));

Learn more

VAD configuration options (vad, vadMode, vadThreshold, vadHoldoff, modelPath) are documented in the Node.js API reference.