mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
#1385: Gather - dont start the continuous asr timer when we first start listening if this is a background gather (#1386)
This commit is contained in:
@@ -93,6 +93,8 @@ class TaskGather extends SttTask {
|
|||||||
|
|
||||||
get needsStt() { return this.input.includes('speech'); }
|
get needsStt() { return this.input.includes('speech'); }
|
||||||
|
|
||||||
|
get isBackgroundGather() { return this.bugname_prefix === 'background_bargeIn_'; }
|
||||||
|
|
||||||
get wantsSingleUtterance() {
|
get wantsSingleUtterance() {
|
||||||
return this.data.recognizer?.singleUtterance === true;
|
return this.data.recognizer?.singleUtterance === true;
|
||||||
}
|
}
|
||||||
@@ -227,7 +229,9 @@ class TaskGather extends SttTask {
|
|||||||
|
|
||||||
const startListening = async(cs, ep) => {
|
const startListening = async(cs, ep) => {
|
||||||
this._startTimer();
|
this._startTimer();
|
||||||
if (this.isContinuousAsr && 0 === this.timeout) this._startAsrTimer();
|
if (this.isContinuousAsr && 0 === this.timeout && !this.isBackgroundGather) {
|
||||||
|
this._startAsrTimer();
|
||||||
|
}
|
||||||
if (this.input.includes('speech') && !this.listenDuringPrompt) {
|
if (this.input.includes('speech') && !this.listenDuringPrompt) {
|
||||||
try {
|
try {
|
||||||
await this._setSpeechHandlers(cs, ep);
|
await this._setSpeechHandlers(cs, ep);
|
||||||
|
|||||||
Reference in New Issue
Block a user