mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-19 04:17:44 +00:00
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2021 Drachtio Communications Services, LLC
|
Copyright (c) 2018-2024 FirstFive8, Inc.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -790,6 +790,8 @@ class TaskGather extends SttTask {
|
|||||||
if (!['soniox', 'aws', 'microsoft', 'deepgram'].includes(this.vendor)) this._startTranscribing(ep);
|
if (!['soniox', 'aws', 'microsoft', 'deepgram'].includes(this.vendor)) this._startTranscribing(ep);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
/* this was removed to fix https://github.com/jambonz/jambonz-feature-server/issues/783 */
|
||||||
|
/*
|
||||||
if (this.bargein && (words + bufferedWords) < this.minBargeinWordCount) {
|
if (this.bargein && (words + bufferedWords) < this.minBargeinWordCount) {
|
||||||
this.logger.debug({evt, words, bufferedWords},
|
this.logger.debug({evt, words, bufferedWords},
|
||||||
'TaskGather:_onTranscription - final transcript but < min barge words');
|
'TaskGather:_onTranscription - final transcript but < min barge words');
|
||||||
@@ -798,25 +800,26 @@ class TaskGather extends SttTask {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (this.vendor === 'soniox') {
|
*/
|
||||||
/* compile transcripts into one */
|
if (this.vendor === 'soniox') {
|
||||||
this._sonioxTranscripts.push(evt.vendor.finalWords);
|
/* compile transcripts into one */
|
||||||
evt = this.compileSonioxTranscripts(this._sonioxTranscripts, 1, this.language);
|
this._sonioxTranscripts.push(evt.vendor.finalWords);
|
||||||
this._sonioxTranscripts = [];
|
evt = this.compileSonioxTranscripts(this._sonioxTranscripts, 1, this.language);
|
||||||
}
|
this._sonioxTranscripts = [];
|
||||||
else if (this.vendor === 'deepgram') {
|
|
||||||
/* compile transcripts into one */
|
|
||||||
if (!emptyTranscript) this._bufferedTranscripts.push(evt);
|
|
||||||
|
|
||||||
/* deepgram can send an empty and final transcript; only if we have any buffered should we resolve */
|
|
||||||
if (this._bufferedTranscripts.length === 0) return;
|
|
||||||
evt = this.consolidateTranscripts(this._bufferedTranscripts, 1, this.language, this.vendor);
|
|
||||||
this._bufferedTranscripts = [];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* here is where we return a final transcript */
|
|
||||||
this._resolve('speech', evt);
|
|
||||||
}
|
}
|
||||||
|
else if (this.vendor === 'deepgram') {
|
||||||
|
/* compile transcripts into one */
|
||||||
|
if (!emptyTranscript) this._bufferedTranscripts.push(evt);
|
||||||
|
|
||||||
|
/* deepgram can send an empty and final transcript; only if we have any buffered should we resolve */
|
||||||
|
if (this._bufferedTranscripts.length === 0) return;
|
||||||
|
evt = this.consolidateTranscripts(this._bufferedTranscripts, 1, this.language, this.vendor);
|
||||||
|
this._bufferedTranscripts = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* here is where we return a final transcript */
|
||||||
|
this._resolve('speech', evt);
|
||||||
|
/*}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user