From 2738299524dd04b8ae551b8feda2b419a89054b5 Mon Sep 17 00:00:00 2001 From: akirilyuk Date: Wed, 2 Feb 2022 22:58:00 +0100 Subject: [PATCH] fix gather --- lib/tasks/cognigy/index.js | 2 +- lib/tasks/cognigy/speech-config.js | 5 +++++ lib/tasks/say.js | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/tasks/cognigy/index.js b/lib/tasks/cognigy/index.js index a09ffd1c..bbe0bffb 100644 --- a/lib/tasks/cognigy/index.js +++ b/lib/tasks/cognigy/index.js @@ -74,7 +74,7 @@ class Cognigy extends Task { rejector = reject; }); this.taskQueue.push(async(cb) => { - this.logger.debug('executing say task from queue'); + this.logger.debug('executing task from queue'); try { const result = await boundTask(); resolver(result); diff --git a/lib/tasks/cognigy/speech-config.js b/lib/tasks/cognigy/speech-config.js index b8c5f42b..b0a48bb4 100644 --- a/lib/tasks/cognigy/speech-config.js +++ b/lib/tasks/cognigy/speech-config.js @@ -66,6 +66,11 @@ class SpeechConfig extends Emitter { if (opts.recognizer) input.push('speech'); if (hasKeys(opts.dtmf)) input.push('digits'); + if(opts.synthesizer){ + // todo remove this once we add support for disabling tts cache + delete opts.synthesizer.disableTtsCache; + } + /* bargein settings */ const bargein = opts.bargein || {}; const speechBargein = Array.isArray(bargein.enable) && bargein.enable.includes('speech'); diff --git a/lib/tasks/say.js b/lib/tasks/say.js index dd92bd38..fc3a5fe8 100644 --- a/lib/tasks/say.js +++ b/lib/tasks/say.js @@ -21,6 +21,8 @@ class TaskSay extends Task { const {updateSpeechCredentialLastUsed} = require('../utils/db-utils')(this.logger, srf); const {writeAlerts, AlertType, stats} = srf.locals; const {synthAudio} = srf.locals.dbHelpers; + + // todo maybe we should allow the user to only change the voice/language without changing the vendor? const hasVerbLevelTts = this.synthesizer.vendor && this.synthesizer.vendor !== 'default'; const vendor = hasVerbLevelTts ? this.synthesizer.vendor : cs.speechSynthesisVendor ; const language = hasVerbLevelTts ? this.synthesizer.language : cs.speechSynthesisLanguage ;