mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
gather: dont resolve if deepgram sends final/empty transcript with no transcripts previously buffered (#618)
This commit is contained in:
@@ -686,6 +686,9 @@ class TaskGather extends SttTask {
|
||||
this.logger.debug('TaskGather:_onTranscription - got speech_final waiting for UtteranceEnd event');
|
||||
return;
|
||||
}
|
||||
|
||||
/* deepgram can send an empty and final transcript; only if we have any buffered should we resolve */
|
||||
if (this._bufferedTranscripts.length === 0) return;
|
||||
this.logger.debug({evt}, 'TaskGather:_onTranscription - compiling deepgram transcripts');
|
||||
evt = this.consolidateTranscripts(this._bufferedTranscripts, 1, this.language);
|
||||
this._bufferedTranscripts = [];
|
||||
|
||||
Reference in New Issue
Block a user