diff --git a/lib/session/call-session.js b/lib/session/call-session.js index 2ed0b1ed..740181aa 100644 --- a/lib/session/call-session.js +++ b/lib/session/call-session.js @@ -181,7 +181,7 @@ class CallSession extends Emitter { } 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) { this.application.fallback_speech_synthesis_vendor = vendor; diff --git a/lib/tasks/gather.js b/lib/tasks/gather.js index c0983a2a..700ae942 100644 --- a/lib/tasks/gather.js +++ b/lib/tasks/gather.js @@ -183,7 +183,9 @@ class TaskGather extends Task { this.logger.info(`Gather:exec - task was quickly killed so do not transcribe for vendor: ${vendor}`); return; } - this._startTranscribing(ep, vendor, language); + this.execVendor = vendor; + this.execLanguage = language; + this._startTranscribing(ep); return updateSpeechCredentialLastUsed(credentials.speech_credential_sid); } @@ -521,16 +523,16 @@ class TaskGather extends Task { .catch((err) => this.logger.info(err, 'Error setting channel variables')); } - _startTranscribing(ep, vendor = this.vendor, language = this.language) { + _startTranscribing(ep) { this.logger.debug({ - vendor, - locale: language, + vendor: this.execVendor, + locale: this.execLanguage, interim: this.interim, bugname: this.bugname }, 'Gather:_startTranscribing'); ep.startTranscription({ - vendor, - locale: language, + vendor: this.execVendor, + locale: this.execLanguage, interim: this.interim, bugname: this.bugname, }).catch((err) => {