bug: clear asr timer when gather resolves with timeout (#788)

This commit is contained in:
Dave Horton
2024-06-28 08:54:36 -04:00
committed by GitHub
parent ec6d7b3f42
commit 111976bea5

View File

@@ -570,7 +570,10 @@ class TaskGather extends SttTask {
} }
_clearAsrTimer() { _clearAsrTimer() {
if (this._asrTimer) clearTimeout(this._asrTimer); if (this._asrTimer) {
this.logger.debug('_clearAsrTimer: asrTimer cleared');
clearTimeout(this._asrTimer);
}
this._asrTimer = null; this._asrTimer = null;
} }
@@ -1010,6 +1013,8 @@ class TaskGather extends SttTask {
clearTimeout(this.interDigitTimer); clearTimeout(this.interDigitTimer);
this._clearTimer(); this._clearTimer();
this._clearFastRecognitionTimer(); this._clearFastRecognitionTimer();
this._clearAsrTimer();
this._clearFinalAsrTimer();
this.span.setAttributes({ this.span.setAttributes({
channel: 1, channel: 1,