The useAudioProcessing hook gathers functions responsible for audio processing such an echo cancellation and noise reduction level and audio capture mode. Hook expose audio capture mode setter as well. Audio capture mode is responsible for specific signal processing ex.
There are several files needed for specific modes.
To ensure the proper work of the audio processor, the dvwc_impl.wasm
, voxeet-dvwc-worker.js
and voxeet-worklet.js
files need to be accessible for download at URL that can be configured using the packageUrlPrefix accessor or by packageUrlPrefix
prop in CommsProvider. Those files can be found in @voxeet/voxeet-web-sdk
node module package.
For additional information please visit Dolby.io.
Music mode is currently supported only by Chrome and Edge browsers.
Name | Type | Description |
---|---|---|
audioMode ? |
AudioCaptureModeOptions | Currently selected audio mode with options. |
getAudioCaptureMode |
() => Promise<AudioCaptureModeOptions / void> | Get current audio mode option or returns warning if audio is disabled. |
setAudioCaptureMode ? |
(option: AudioCaptureModeOptions) => Promise | Setter for specific audio mode. |
echoCancellation ? |
boolean | Informs about current echo canellation state. |
isMusicMode ? |
boolean | Informs if music mode is enabled / disabled. |
toggleEchoCancellation ? |
() => Promise | Toggles echo cancellation. |
setNoiseReductionLevel ? |
(value: NoiseReductionLevel) => Promise | Setter for noise reduction level. |
isMusiModeSupported |
boolean | Informs if music mode is supported by environment. |
const { setAudioCaptureMode } = useAudioProcessing();
...
<button onClick={()=>setAudioCaptureMode({mode:AudioCaptureMode.Music })}>...</button>
const {toggleEchoCancellation} = useAudioProcessing()
<button onClick={toggleEchoCancellation}>...</button>