fix gather

This commit is contained in:
akirilyuk
2022-02-02 22:58:00 +01:00
parent e872d314b3
commit 2738299524
3 changed files with 8 additions and 1 deletions

View File

@@ -74,7 +74,7 @@ class Cognigy extends Task {
rejector = reject; rejector = reject;
}); });
this.taskQueue.push(async(cb) => { this.taskQueue.push(async(cb) => {
this.logger.debug('executing say task from queue'); this.logger.debug('executing task from queue');
try { try {
const result = await boundTask(); const result = await boundTask();
resolver(result); resolver(result);

View File

@@ -66,6 +66,11 @@ class SpeechConfig extends Emitter {
if (opts.recognizer) input.push('speech'); if (opts.recognizer) input.push('speech');
if (hasKeys(opts.dtmf)) input.push('digits'); 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 */ /* bargein settings */
const bargein = opts.bargein || {}; const bargein = opts.bargein || {};
const speechBargein = Array.isArray(bargein.enable) && bargein.enable.includes('speech'); const speechBargein = Array.isArray(bargein.enable) && bargein.enable.includes('speech');

View File

@@ -21,6 +21,8 @@ class TaskSay extends Task {
const {updateSpeechCredentialLastUsed} = require('../utils/db-utils')(this.logger, srf); const {updateSpeechCredentialLastUsed} = require('../utils/db-utils')(this.logger, srf);
const {writeAlerts, AlertType, stats} = srf.locals; const {writeAlerts, AlertType, stats} = srf.locals;
const {synthAudio} = srf.locals.dbHelpers; 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 hasVerbLevelTts = this.synthesizer.vendor && this.synthesizer.vendor !== 'default';
const vendor = hasVerbLevelTts ? this.synthesizer.vendor : cs.speechSynthesisVendor ; const vendor = hasVerbLevelTts ? this.synthesizer.vendor : cs.speechSynthesisVendor ;
const language = hasVerbLevelTts ? this.synthesizer.language : cs.speechSynthesisLanguage ; const language = hasVerbLevelTts ? this.synthesizer.language : cs.speechSynthesisLanguage ;