@zhaonx96/vad
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

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/@zhaonx96/vad@1.0.2/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.

Package Sidebar

Install

npm i @zhaonx96/vad

Weekly Downloads

4

Version

1.0.6

License

ISC

Unpacked Size

84 kB

Total Files

60

Last publish

Collaborators

  • zhaonx96