This commit is contained in:
Quan HL
2023-08-18 12:17:30 +07:00
parent 4322159a41
commit aa161290c7
2 changed files with 9 additions and 7 deletions

View File

@@ -181,7 +181,7 @@ class CallSession extends Emitter {
} }
get fallbackSpeechSynthesisVendor() { get fallbackSpeechSynthesisVendor() {
return this.application.fallback_speech_synthesis_vendor; return this.application.use_for_fallback_speech ? this.application.fallback_speech_synthesis_vendor : null;
} }
set fallbackSpeechSynthesisVendor(vendor) { set fallbackSpeechSynthesisVendor(vendor) {
this.application.fallback_speech_synthesis_vendor = vendor; this.application.fallback_speech_synthesis_vendor = vendor;

View File

@@ -183,7 +183,9 @@ class TaskGather extends Task {
this.logger.info(`Gather:exec - task was quickly killed so do not transcribe for vendor: ${vendor}`); this.logger.info(`Gather:exec - task was quickly killed so do not transcribe for vendor: ${vendor}`);
return; return;
} }
this._startTranscribing(ep, vendor, language); this.execVendor = vendor;
this.execLanguage = language;
this._startTranscribing(ep);
return updateSpeechCredentialLastUsed(credentials.speech_credential_sid); return updateSpeechCredentialLastUsed(credentials.speech_credential_sid);
} }
@@ -521,16 +523,16 @@ class TaskGather extends Task {
.catch((err) => this.logger.info(err, 'Error setting channel variables')); .catch((err) => this.logger.info(err, 'Error setting channel variables'));
} }
_startTranscribing(ep, vendor = this.vendor, language = this.language) { _startTranscribing(ep) {
this.logger.debug({ this.logger.debug({
vendor, vendor: this.execVendor,
locale: language, locale: this.execLanguage,
interim: this.interim, interim: this.interim,
bugname: this.bugname bugname: this.bugname
}, 'Gather:_startTranscribing'); }, 'Gather:_startTranscribing');
ep.startTranscription({ ep.startTranscription({
vendor, vendor: this.execVendor,
locale: language, locale: this.execLanguage,
interim: this.interim, interim: this.interim,
bugname: this.bugname, bugname: this.bugname,
}).catch((err) => { }).catch((err) => {