Skip to content

SileroVAD

Local Silero voice-activity-detection engine.

Defined in: src/core/vad/SileroVAD.ts:137

Local Silero voice-activity-detection engine.

Remarks

Stateful across frames — call reset between listening sessions so one session’s trailing state does not bias the next.

Example

const vad = new SileroVAD({ modelUrl: '/models/silero_vad_v5.onnx' });
await vad.initialize();

const probability = await vad.process(frame); // Float32Array(512) @ 16 kHz
if (probability > 0.5) console.log('speech!');

See

  • VADEngine for the interface contract
  • VADProcessor for the framing/hysteresis layer that drives this engine

Implements

Constructors

Constructor

new SileroVAD(options?): SileroVAD;

Defined in: src/core/vad/SileroVAD.ts:166

Parameters

ParameterType
optionsSileroVADOptions

Returns

SileroVAD

Properties

PropertyModifierTypeDefault valueDescriptionDefined in
frameSamplesreadonly512SILERO_FRAME_SAMPLESSamples per frame the engine expects (e.g. 512 at 16 kHz ≈ 32 ms).src/core/vad/SileroVAD.ts:138
sampleRatereadonly16000SILERO_SAMPLE_RATESample rate the engine expects, in Hz.src/core/vad/SileroVAD.ts:139

Methods

dispose()

dispose(): Promise<void>;

Defined in: src/core/vad/SileroVAD.ts:294

Release model resources.

Returns

Promise<void>

Implementation of

VADEngine.dispose


initialize()

initialize(): Promise<void>;

Defined in: src/core/vad/SileroVAD.ts:178

Load ONNX Runtime and the Silero model, and detect the model version.

Returns

Promise<void>

Throws

ProviderInitializationError when the ONNX Runtime peer dependency is not installed.

Throws

Error when the model cannot be fetched or has an unrecognized input signature.

Implementation of

VADEngine.initialize


process()

process(frame): Promise<number>;

Defined in: src/core/vad/SileroVAD.ts:217

Score one 512-sample frame, updating recurrent state.

Parameters

ParameterTypeDescription
frameFloat32ArrayExactly 512 mono samples in [-1, 1] at 16 kHz.

Returns

Promise<number>

Speech probability in [0, 1].

Implementation of

VADEngine.process


reset()

reset(): void;

Defined in: src/core/vad/SileroVAD.ts:286

Clear recurrent state (call between listening sessions).

Returns

void

Implementation of

VADEngine.reset

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency