mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
feat/864: enable bargeIn when minBargeinWordCount is 0 (#900)
* feat/864: checking for undefined, because 0 is a valid value for minBargeinWordCount * feat/864: checking for undefined and null * feat/864: corrected spelling of mode and added check for undefined as 0 is a valid value for vad.mode
This commit is contained in:
@@ -34,7 +34,8 @@ class TaskConfig extends Task {
|
||||
'finishOnKey', 'input', 'numDigits', 'minDigits', 'maxDigits',
|
||||
'interDigitTimeout', 'bargein', 'dtmfBargein', 'minBargeinWordCount', 'actionHook'
|
||||
].forEach((k) => {
|
||||
if (this.bargeIn[k]) this.gatherOpts[k] = this.bargeIn[k];
|
||||
const val = this.bargeIn[k];
|
||||
if (val !== undefined && val !== null) this.gatherOpts[k] = val;
|
||||
});
|
||||
}
|
||||
if (this.transcribe?.enable) {
|
||||
@@ -295,7 +296,7 @@ class TaskConfig extends Task {
|
||||
voiceMs: this.vad.voiceMs || 250,
|
||||
silenceMs: this.vad.silenceMs || 150,
|
||||
strategy: this.vad.strategy || 'one-shot',
|
||||
mode: this.vad.mod || 2
|
||||
mode: (this.vad.mode !== undefined && this.vad.mode !== null) ? this.vad.mode : 2
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user