handle altLanguages set at the session level via config verb; fix azure stt race condition with final transcripts from stopped recognition

This commit is contained in:
Dave Horton
2022-08-25 22:43:38 +02:00
parent 127432f2ec
commit 887c6243e2
4 changed files with 54 additions and 9 deletions

View File

@@ -274,6 +274,18 @@ class CallSession extends Emitter {
return this._globalSttHints;
}
set altLanguages(langs) {
this._globalAltLanguages = langs;
}
get hasAltLanguages() {
return Array.isArray(this._globalAltLanguages);
}
get altLanguages() {
return this._globalAltLanguages;
}
async notifyRecordOptions(opts) {
const {action} = opts;
this.logger.debug({opts}, 'CallSession:notifyRecordOptions');
@@ -1112,7 +1124,6 @@ class CallSession extends Emitter {
* @param {Task} task - task to be executed
*/
async _evalEndpointPrecondition(task) {
this.logger.debug('CallSession:_evalEndpointPrecondition');
if (this.callGone) new Error(`${BADPRECONDITIONS}: call gone`);
if (this.ep) {