Audio Recording
Web Quick Start
Platforms
- Chrome & Chromium-based browsers
- Edge
- Firefox
- Safari
Requirements
- Node.js 14+
- npm
Quick Start
Setup
Install Node.js.
Install the Web Voice Processor package:
Usage
WebVoiceProcessor follows the subscribe/unsubscribe pattern. WebVoiceProcessor will automatically start recording audio as soon as an engine is subscribed:
An engine is either a Web Worker or an object implementing the following interface within their onmessage method:
Unsubscribing engines that were initially subscribed (when no more engines are subscribed, audio recording will stop automatically):
Use the reset
function to remove all engines and stop recording audio.
To update the audio capture settings in WebVoiceProcessor
, use the setOptions
function:
Demo
For the Voice Processor Web SDK we have an example that demonstrates how to use WebVoiceProcessor
in a simple web page.
Setup
Clone the web-voice-processor repository from GitHub:
Usage
- Install dependencies and start the server:
Open http://localhost:5000 to view it in the browser.
Start and stop recording with the button and watch the VU meter react to recorded audio.
For more information on our Voice Processor demo for Web, head over to our GitHub repository.