Skip to main content

createVADetector

function createVADetector(
onDetected,
shouldDetect,
options?): <T>(isVoice) => (data) => void;

Create a voice detector based on provided params

Parameters​

ParameterTypeDescription
onDetected() => voidWhen there is voice activity, this callback will be called
shouldDetect() => booleanWhen return true, voice activity will function, otherwise, not function
options?ThrottleOptions

Returns​

<T>(isVoice): (data) => void;

Type Parameters​

Type Parameter
T

Parameters​

ParameterType
isVoiceIsVoice<T>

Returns​

(data): void;

Parameters​

ParameterType
dataT

Returns​

void

See​

ThrottleOptions