fixed deepgram gather cannot be timeout on empty transcription with continueAsr (#1171)

This commit is contained in:
Hoan Luu Huu
2025-04-28 19:36:31 +07:00
committed by GitHub
parent 9d54ca8116
commit c2666b7a09

View File

@@ -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(() => {