# Repository Briefing: ricky0123/vad
> Source: https://repoforai.com/repo/ricky0123/vad (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/ricky0123/vad
- **Official Docs / Website**: https://www.vad.ricky0123.com
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: TypeScript
- **License**: See repository
- **Engineering Health**: B (61/100 · Maintenance 20/35 · Adoption 18/25 · Releases 17/20 · License 6/20)
- **Latest Release**: @ricky0123/vad-web/v0.0.31 (2026-09-12) — https://github.com/ricky0123/vad/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Local AI
- **Momentum**: 2,088 ★ total (+0 24h / +6 7d) · 273 forks
- **Topics**: `onnxruntime`, `silero-vad`, `speech-to-text`, `typescript`, `voice-activity-detection`, `web`, `web-audio-api`
- **When to Use**: Best for: Browser or React apps that need a speaking indicator or want to hand completed utterances to a separately chosen local or remote pipeline. Skip if: You need transcripts, diarization, or continuous audio streaming out of the box, or your application only needs a loudness meter.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Browser entry point: `MicVAD.new` initializes the detector; `start()` starts detection.
- Audio contract: `onSpeechEnd` returns a 16 kHz `Float32Array` for each completed speech segment.
- Runtime split: Silero inference runs through ONNX Runtime Web in the browser and ONNX Runtime Node.js on the Node path.
- Model artifacts: The repository includes legacy, v5, and v6 Silero ONNX files.
- Asset configuration: `baseAssetPath` and `onnxWASMBasePath` separately locate detector assets and ONNX Runtime Web WASM assets.
- Release milestone: `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.
```

## Quick Start / Clone
```bash
<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>
```
