Early Beta — The Web SDK is in early beta. APIs may change between releases.
Overview
Voice Activity Detection (VAD) determines when speech is present in an audio stream. It’s essential for building voice interfaces that automatically detect when users start and stop speaking. The Web SDK uses Silero VAD compiled to WebAssembly via sherpa-onnx.Package Imports
VAD classes come from@runanywhere/web-onnx, while model management is in @runanywhere/web:
Basic Usage
Model Registration
Register the Silero VAD model in your model catalog:API Reference
VAD.processSamples
Process audio samples for voice activity.
true if speech is detected in the current frame.
VAD.onSpeechActivity
Subscribe to speech activity events.
SpeechActivity
VAD.popSpeechSegment
Get the most recent completed speech segment.
Other Methods
Examples
Live Microphone VAD
VAD + STT (Record and Transcribe)
React Component
VoiceDetector.tsx
Error Handling
Related
STT Transcribe
Speech-to-Text
Voice Agent
Full voice pipeline
STT Streaming
Real-time transcription