createVADetector
function createVADetector(
onDetected,
shouldDetect,
options?): <T>(isVoice) => (data) => void;
Create a voice detector based on provided params
Parameters
| Parameter | Type | Description |
|---|---|---|
onDetected | () => void | When there is voice activity, this callback will be called |
shouldDetect | () => boolean | When return true, voice activity will function, otherwise, not function |
options? | ThrottleOptions |
Returns
<T>(isVoice): (data) => void;
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
isVoice | IsVoice<T> |
Returns
(data): void;
Parameters
| Parameter | Type |
|---|---|
data | T |
Returns
void
See
ThrottleOptions