mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
This commit is contained in:
@@ -185,7 +185,10 @@ const selectDefaultGoogleModel = (task, language, version) => {
|
|||||||
(useV2 ? 'long' : 'latest_long');
|
(useV2 ? 'long' : 'latest_long');
|
||||||
};
|
};
|
||||||
const consolidateTranscripts = (bufferedTranscripts, channel, language, vendor) => {
|
const consolidateTranscripts = (bufferedTranscripts, channel, language, vendor) => {
|
||||||
if (bufferedTranscripts.length === 1) return bufferedTranscripts[0];
|
if (bufferedTranscripts.length === 1) {
|
||||||
|
bufferedTranscripts[0].is_final = true;
|
||||||
|
return bufferedTranscripts[0];
|
||||||
|
}
|
||||||
let totalConfidence = 0;
|
let totalConfidence = 0;
|
||||||
const finalTranscript = bufferedTranscripts.reduce((acc, evt) => {
|
const finalTranscript = bufferedTranscripts.reduce((acc, evt) => {
|
||||||
totalConfidence += evt.alternatives[0].confidence;
|
totalConfidence += evt.alternatives[0].confidence;
|
||||||
|
|||||||
Reference in New Issue
Block a user