Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@ricky0123/vad-web

ricky012396.4kISC0.0.24TypeScript support: included

Powerful, user-friendly voice activity detector (VAD) for the browser

speech-recognition, wake-word-detection, machine-learning, voice-activity-detection, vad, onnx, voice-control, offline-speech-recognition

readme

Voice Activity Detector for the Browser

Prompt your user for microphone permissions and run callbacks on segments of audio with user speech in a few lines of code.

Quick start:

<script src="https://cdn.jsdelivr.net/npm/onnxruntime-web/dist/ort.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@ricky0123/vad-web@latest/dist/bundle.min.js"></script>
<script>
  async function main() {
    const myvad = await vad.MicVAD.new({
      onSpeechEnd: (audio) => {
        // do something with `audio` (Float32Array of audio samples at sample rate 16000)...
      }
    })
    myvad.start()
  }
  main()
</script>

See the project home for more details.