From c2666b7a09c4153f4fabadc875df858f6a568953 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Mon, 28 Apr 2025 19:36:31 +0700 Subject: [PATCH] fixed deepgram gather cannot be timeout on empty transcription with continueAsr (#1171) --- lib/tasks/gather.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index 67802a2b..efc19a0b 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -685,7 +685,9 @@ class TaskGather extends SttTask { } _startAsrTimer() { - if (this.vendor === 'deepgram') return; // no need + // Deepgram has a case that UtteranceEnd is not sent to cover the last word end time. + // So we need to wait for the asrTimeout to be sure that the last word is sent. + // if (this.vendor === 'deepgram') return; // no need assert(this.isContinuousAsr); this._clearAsrTimer(); this._asrTimer = setTimeout(() => {