Voice Processor 
 Web API
API Reference for the Voice Processor Web SDK (npmjs).
PvEngine
Type that represents an engine that can receive frames of audio by subscribing to WebVoiceProcessor.
WebVoiceProcessor
Class for capturing audio and delivering audio data to subscribing audio processing engines.
WebVoiceProcessor.audioContext
Gets the current audio context.
WebVoiceProcessor.isRecording
Flag to check if WebVoiceProcessor is currently recording.
WebVoiceProcessor.audioDump()
Record some sample raw signed 16-bit PCM data for some duration, then pack it as a Blob.
Parameters
durationMsnumber : Duration of the recording, in milliseconds.
Returns
- Promise<Blob> : The audio data in 
Blobformat, wrapped in aPromise. 
WebVoiceProcessor.subscribe()
Subscribe one or more engines. A subscribed engine will receive audio frames via .postMessage({command: 'process', inputFrame: inputFrame}). Audio capture will start as soon as there is one or more engine subscribed.
Parameters
WebVoiceProcessor.unsubscribe()
Unsubscribe one or more engines. The unsubscribed engines will no longer receive audio frames. Audio capture will stop as soon as there is no more engines subscribed.
Parameters
WebVoiceProcessor.reset()
Removes all engines and stops recording audio.
WebVoiceProcessor.setOptions()
Set new WebVoiceProcessor options. If forceUpdate is not set to true, all engines must be unsubscribed and subscribed again in order for the recorder to take the new changes. Using forceUpdate might cause a small gap where audio frames are not received.
Parameters
optionsWebVoiceProcessorOptions : Audio configuration for recording.forceUpdateboolean : Flag to force update recorder with new options.
WebVoiceProcessorOptions
Type containing the audio recording configuration use by WebVoiceProcessor.
Parameters
frameLengthnumber : Number of samples per frame of audio (default: 512).outputSampleRatenumber : Target sample rate of recorded audio (default: 16000).deviceIdstring | null : Microphone id to use (can be fetched with mediaDevices.enumerateDevices).filterOrdernumber : Filter order (default: 50).
WvpError
Class the represents errors produced by WebVoiceProcessor.
WvpMessageEvent
Class that represents the message an engine receives when a frame of audio is captured by WebVoiceProcessor.