gather: fix bug where empty deepgram transcript saved incorrectly

This commit is contained in:
Dave Horton
2024-04-13 09:59:02 -04:00
parent 1d77c0cd20
commit 2595f527ff

View File

@@ -837,7 +837,7 @@ class TaskGather extends SttTask {
if (this.bargein && (words + bufferedWords) < this.minBargeinWordCount) {
this.logger.debug({evt, words, bufferedWords},
'TaskGather:_onTranscription - final transcript but < min barge words');
this._bufferedTranscripts.push(evt);
if (!emptyTranscript) this._bufferedTranscripts.push(evt);
if (!['soniox', 'aws', 'microsoft', 'deepgram'].includes(this.vendor)) this._startTranscribing(ep);
return;
}