mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 09:08:02 +00:00
further fix for accumulating transcripts
This commit is contained in:
@@ -321,7 +321,7 @@ class TaskTranscribe extends SttTask {
|
|||||||
this.logger.debug('Gather:_onTranscription - got UtteranceEnd event from deepgram, return buffered transcript');
|
this.logger.debug('Gather:_onTranscription - got UtteranceEnd event from deepgram, return buffered transcript');
|
||||||
evt = this.consolidateTranscripts(bufferedTranscripts, channel, this.language, this.vendor);
|
evt = this.consolidateTranscripts(bufferedTranscripts, channel, this.language, this.vendor);
|
||||||
evt.is_final = true;
|
evt.is_final = true;
|
||||||
bufferedTranscripts = [];
|
this._bufferedTranscripts[channel - 1] = [];
|
||||||
this._resolve(channel, evt);
|
this._resolve(channel, evt);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@@ -392,7 +392,7 @@ class TaskTranscribe extends SttTask {
|
|||||||
/* deepgram can send an empty and final transcript; only if we have any buffered should we resolve */
|
/* deepgram can send an empty and final transcript; only if we have any buffered should we resolve */
|
||||||
if (bufferedTranscripts.length === 0) return;
|
if (bufferedTranscripts.length === 0) return;
|
||||||
evt = this.consolidateTranscripts(bufferedTranscripts, channel, this.language);
|
evt = this.consolidateTranscripts(bufferedTranscripts, channel, this.language);
|
||||||
bufferedTranscripts = [];
|
this._bufferedTranscripts[channel - 1] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* here is where we return a final transcript */
|
/* here is where we return a final transcript */
|
||||||
|
|||||||
Reference in New Issue
Block a user