From b4ed4c8c46b33dbcab54d073bc9d0462a92be4ce Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Thu, 9 Oct 2025 08:47:51 -0400 Subject: [PATCH] #1385: Gather - dont start the continuous asr timer when we first start listening if this is a background gather (#1386) --- lib/tasks/gather.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 9d88200e..86187b2f 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -93,6 +93,8 @@ class TaskGather extends SttTask { get needsStt() { return this.input.includes('speech'); } + get isBackgroundGather() { return this.bugname_prefix === 'background_bargeIn_'; } + get wantsSingleUtterance() { return this.data.recognizer?.singleUtterance === true; } @@ -227,7 +229,9 @@ class TaskGather extends SttTask { const startListening = async(cs, ep) => { 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) { try { await this._setSpeechHandlers(cs, ep);