end if last_word_end is -1 (#1196)

* end if last_word_end is -1

* lint
This commit is contained in:
Sam Machin
2025-05-12 17:11:32 +01:00
committed by GitHub
parent 8217a76697
commit 6b68d32e2c

View File

@@ -847,7 +847,8 @@ class TaskGather extends SttTask {
}
else {
const utteranceTime = evt.last_word_end;
if (utteranceTime && this._dgTimeOfLastUnprocessedWord && utteranceTime < this._dgTimeOfLastUnprocessedWord) {
// eslint-disable-next-line max-len
if (utteranceTime && this._dgTimeOfLastUnprocessedWord && utteranceTime < this._dgTimeOfLastUnprocessedWord && utteranceTime != -1) {
this.logger.debug('Gather:_onTranscription - got UtteranceEnd with unprocessed words, continue listening');
}
else {