This commit is contained in:
Dave Horton
2024-01-25 08:46:57 -05:00
committed by GitHub
parent b867395d87
commit e57c7ba90a

View File

@@ -499,7 +499,9 @@ class TaskGather extends SttTask {
if (this._timeoutTimer) { if (this._timeoutTimer) {
clearTimeout(this._timeoutTimer); clearTimeout(this._timeoutTimer);
this._timeoutTimer = null; this._timeoutTimer = null;
return true;
} }
return false;
} }
_startAsrTimer() { _startAsrTimer() {
@@ -701,8 +703,7 @@ class TaskGather extends SttTask {
} }
} }
else { else {
this._clearTimer(); if (this._clearTimer()) this._startTimer();
this._startTimer();
if (this.bargein && (words + bufferedWords) >= this.minBargeinWordCount) { if (this.bargein && (words + bufferedWords) >= this.minBargeinWordCount) {
if (!this.playComplete) { if (!this.playComplete) {
this.logger.debug({transcript: evt.alternatives[0].transcript}, 'killing audio due to speech'); this.logger.debug({transcript: evt.alternatives[0].transcript}, 'killing audio due to speech');