ricky0123/vad

Voice activity detector (VAD) for the browser with a simple API

TypeScript

2,061

264 commits

updated Sep 12, 2026

See the code

README

Voice Activity Detection for Javascript

npm vad-web npm vad-react Become a Sponsor

Run callbacks on segments of audio with user speech in a few lines of code

This package aims to provide an accurate, user-friendly voice activity detector (VAD) that runs in the browser. By using this package, you can prompt the user for microphone permissions, start recording audio, send segments of audio with speech to your server for processing, or show an animation or indicator when the user is speaking.

Links:

  • Project landing page, where you can see a live demo in action.
  • Ask a question or share what you've built on Discord!
  • Browse the documentation, the source code of which is located in the ./docs directory.

Under the hood, these packages run Silero VAD [1] using ONNX Runtime Web / ONNX Runtime Node.js. Thanks a lot to them for making this possible.

Sponsorship

Please consider sponsoring this project if you have found it useful!

Quick Start

To use the VAD via a script tag in the browser, include the following script tags:

<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>

Documentation for bundling the voice activity detector for the browser or using it in node or React projects can be found on docs.vad.ricky0123.com.

Cool projects using this library

References

[1] Silero Team. (2021). Silero VAD: pre-trained enterprise-grade Voice Activity Detector (VAD), Number Detector and Language Classifier. GitHub, GitHub repository, https://github.com/snakers4/silero-vad, hello@silero.ai.

onnxruntime
silero-vad
speech-to-text
typescript
voice-activity-detection
web
web-audio-api

Significant stargazers

Jaana Dogan

13,150 followers · starred Feb 2025

EGOIST

13,375 followers · starred Jul 2024

David Johnson

480 followers · starred Feb 2026

Shaw

2,178 followers · starred Jul 2024

ricky0123/vad

Voice activity detector (VAD) for the browser with a simple API

TypeScript

2,061

264 commits

updated Sep 12, 2026

See the code

README

Voice Activity Detection for Javascript

npm vad-web npm vad-react Become a Sponsor

Run callbacks on segments of audio with user speech in a few lines of code

This package aims to provide an accurate, user-friendly voice activity detector (VAD) that runs in the browser. By using this package, you can prompt the user for microphone permissions, start recording audio, send segments of audio with speech to your server for processing, or show an animation or indicator when the user is speaking.

Links:

  • Project landing page, where you can see a live demo in action.
  • Ask a question or share what you've built on Discord!
  • Browse the documentation, the source code of which is located in the ./docs directory.

Under the hood, these packages run Silero VAD [1] using ONNX Runtime Web / ONNX Runtime Node.js. Thanks a lot to them for making this possible.

Sponsorship

Please consider sponsoring this project if you have found it useful!

Quick Start

To use the VAD via a script tag in the browser, include the following script tags:

<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>

Documentation for bundling the voice activity detector for the browser or using it in node or React projects can be found on docs.vad.ricky0123.com.

Cool projects using this library

References

[1] Silero Team. (2021). Silero VAD: pre-trained enterprise-grade Voice Activity Detector (VAD), Number Detector and Language Classifier. GitHub, GitHub repository, https://github.com/snakers4/silero-vad, hello@silero.ai.

onnxruntime
silero-vad
speech-to-text
typescript
voice-activity-detection
web
web-audio-api

Significant stargazers

Jaana Dogan

13,150 followers · starred Feb 2025

EGOIST

13,375 followers · starred Jul 2024

David Johnson

480 followers · starred Feb 2026

Shaw

2,178 followers · starred Jul 2024

Languages

TypeScript

72.9%

JavaScript

18.4%

HTML

6.0%

Shell

2.7%