/web-voice-processor

A library for real-time voice processing in web browsers

Primary LanguageTypeScript

Web Voice Processor

GitHub release

Made in Vancouver, Canada by Picovoice

A library for real-time voice processing in web browsers.

  • Uses the Web Audio API to access microphone audio.
  • Leverages Web Workers to offload compute-intensive tasks off of the main thread.
  • Converts the microphone sampling rate to 16kHz, the de facto standard for voice processing engines.
  • Provides a flexible interface to pass in arbitrary voice processing workers.

For more detailed information, refer to the package's readme.

Build from source

Go to the package directory. Use yarn or npm to build WebVoiceProcessor:

yarn
yarn build

(or)

npm install
npm run-script build

The build script outputs minified and non-minified versions of the IIFE and ESM formats to the dist folder. It also will output the TypeScript type definitions.

Demo

Go to the demo directory. Use yarn or npm to install the dependencies, and the start script to start a local web server hosting the demo.

yarn
yarn start

(or)

npm
npm run start

Open localhost:5000 in your web browser, as hinted at in the output:

Available on:
  http://localhost:5000
Hit CTRL-C to stop the server

You will see the VU meter responding to microphone volume in real time.