Skip to content

Commit

Permalink
mod_vad_detect
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed May 28, 2024
1 parent 862d3f8 commit 2d482d0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/endpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -929,11 +929,11 @@ class Endpoint extends Emitter {
*/
startVadDetection(opts, callback) {
opts = opts || {};
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 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', strategy, mode, silence_ms, voice_ms, bugname];
Expand Down Expand Up @@ -962,7 +962,7 @@ class Endpoint extends Emitter {

stopVadDetection(opts, callback) {
opts = opts || {};
const bugname = opts.bugname | 'vad_detection';
const bugname = opts.bugname || 'vad_detection';
const __x = (callback) => {
const args = [this.uuid, 'stop', bugname];
this.api('uuid_vad_detect', args, (err, evt) => {
Expand Down

0 comments on commit 2d482d0

Please sign in to comment.