ricky0123/vad
A browser-first TypeScript SDK for local Silero speech detection and segmentation
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
The TypeScript SDK places Silero voice activity detection between browser microphone capture and application code. The browser entry point is MicVAD.new(...) followed by start(). ONNX Runtime Web executes the model locally; application code consumes speech events rather than implementing the detector. The Node.js path uses ONNX Runtime Node.js, and React has a separately released vad-react package.
The repository separates package code under packages/, examples under examples/, and a browser test site under test-site/. The root npm scripts cover builds, tests, linting, type checking, and building and serving the test site. The Python 3.10+ Poetry manifest configures MkDocs tooling for docs/; it is not part of the browser inference path.
Key Capabilities & Differentiators
onSpeechStart can drive a speaking indicator without waiting for a complete utterance. onSpeechEnd supplies a completed segment as a 16 kHz Float32Array. That is a concrete handoff for local processing or selective upload to a transcription backend, but it is not a transcript or an encoded audio file. The application owns downstream processing and transport.
The repository includes Silero legacy, v5, and v6 ONNX artifacts. The vad-web 0.0.31 release adds v6 support and supplies the missing v5 context window. The resulting release boundary matters when validating model behavior, but it does not establish which model is the default or quantify detection accuracy.
Trade-offs & Limitations
Compared with integrating Silero directly, the SDK saves browser microphone and speech-segment wiring, at the cost of adopting its callback and asset-loading conventions. Compared with continuous upload to a cloud speech service, local VAD lets the app decide whether any audio leaves the device and which segments to send. It does not replace recognition, and the completed-segment callback is not a continuous streaming interface.
WASM avoids a dedicated GPU requirement on the documented browser path, but asset startup cost, CPU use, and segment timing still need measurement on target devices. Test background noise, short pauses, and low-powered devices before using speech boundaries to gate a production pipeline. The root contains a LICENSE file, but the license terms are unspecified here; verify the code and asset terms before redistribution.
Hardware & Deployment Guide
The script-tag quick start pairs the ONNX Runtime Web 1.22.0 WASM build with @ricky0123/vad-web 0.0.31. The browser needs microphone permission and reachable assets. baseAssetPath locates detector assets, while onnxWASMBasePath locates ONNX Runtime Web WASM assets. The example uses jsDelivr; hosting the required assets yourself removes that CDN dependency. For offline use, verify that those assets remain available without a network connection.
The browser WASM path does not require a GPU or an inference server; Node integrations use the separate ONNX Runtime Node.js path. The vad-react 0.0.37 release points to the vad-web 0.0.31 changes. When upgrading, pin the SDK and associated assets and regression-test speech boundaries on representative audio, particularly if relying on v5 behavior or adopting v6.
MicVAD.new initializes the detector; start() starts detection.onSpeechEnd returns a 16 kHz Float32Array for each completed speech segment.baseAssetPath and onnxWASMBasePath separately locate detector assets and ONNX Runtime Web WASM assets.vad-web 0.0.31 adds v6 support and restores the v5 context window; vad-react 0.0.37 points to the same release notes.Browser or React apps that need a speaking indicator or want to hand completed utterances to a separately chosen local or remote pipeline.
You need transcripts, diarization, or continuous audio streaming out of the box, or your application only needs a loudness meter.
Quick Start & Installation
<script src="https://cdn.jsdelivr.net/npm/onnxruntime-web@1.22.0/dist/ort.wasm.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/@ricky0123/vad-web@0.0.31/dist/bundle.min.js"></script> <script> async function main() { const myvad = await vad.MicVAD.new({ onSpeechStart: () => { console.log("Speech start detected") }, onSpeechEnd: (audio) => { // do something with `audio` (Float32Array of audio samples at sample rate 16000)... }, onnxWASMBasePath: "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.22.0/dist/", baseAssetPath: "https://cdn.jsdelivr.net/npm/@ricky0123/vad-web@0.0.31/dist/", }) myvad.start() } main() </script>
Comparison vs. Top Voice, Vision & Video Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| vad ★ | 2.1k | +6 | TypeScript | — | A browser-first TypeScript SDK for local Silero speech detection and segmentatio |
| whisperX | 26.5k | +677 | Python | BSD-2-Clause | Batched Whisper with forced alignment for word timings and optional speaker labe |
| mlx-audio | 8.4k | +32 | Python | MIT | MLX inference SDK for local speech and audio pipelines on Apple Silicon |
| RealtimeSTT | 10.3k | +11 | Python | Apache-2.0 | Local streaming speech-to-text: a Python SDK and FastAPI service for low-latency |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/ricky0123/vad.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about vad
How do I wire microphone speech events into an application?
MicVAD.new, register onSpeechStart and onSpeechEnd, and call start(). Use the start event for immediate UI state changes and the end callback for processing a completed segment. The callback supplies a 16 kHz Float32Array, not an encoded media file, so check the input contract of the next component.Do I need a GPU, and how should I estimate runtime overhead?
Can I self-host the assets in a commercial application?
LICENSE file, but its terms are unspecified here. Before commercial redistribution, review that file and the applicable terms for the Silero model and ONNX Runtime assets you intend to ship. Assess microphone data handling separately if your application uploads segments.When should I use this instead of direct Silero integration, transcription, or a level meter?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy