diff --git a/lib/endpoint.js b/lib/endpoint.js index 6f4e895..f4b0643 100644 --- a/lib/endpoint.js +++ b/lib/endpoint.js @@ -910,7 +910,7 @@ class Endpoint extends Emitter { } /** * VAD detection - * @param {string} opts.action = one-shot, continuou, default is one-shot + * @param {string} opts.strategy = one-shot, continuous, default is one-shot * @param {string} [opts.mode] Default value is 2 * -1 ("disable fvad, use native") * - 0 ("quality") @@ -929,14 +929,14 @@ class Endpoint extends Emitter { */ startVadDetection(opts, callback) { opts = opts || {}; - const action = opts.action | 'one-shot'; + const strategy = opts.strategy | 'one-shot'; const mode = opts.mode | 2; const silence_ms = opts.silence_ms | 250; const voice_ms = opts.voice_ms | 150; const bugname = opts.bugname | 'vad_detection'; const __x = (callback) => { - const args = [this.uuid, 'start', action, mode, silence_ms, voice_ms, bugname]; + const args = [this.uuid, 'start', strategy, mode, silence_ms, voice_ms, bugname]; this.api('uuid_vad_detect', args, (err, evt) => { if (err) return callback(err); const body = evt.getBody() ;