drop queue speech on barge in

This commit is contained in:
akirilyuk
2022-02-03 17:47:11 +01:00
parent a1c59a5f25
commit 7e9b6498c5
4 changed files with 58 additions and 14 deletions

View File

@@ -22,11 +22,9 @@ class TaskSay extends Task {
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 ;
const voice = hasVerbLevelTts ? this.synthesizer.voice : cs.speechSynthesisVoice ;
const vendor = this.synthesizer.vendor || cs.speechSynthesisVendor;
const language = this.synthesizer.language || cs.speechSynthesisLanguage ;
const voice = this.synthesizer.voice || cs.speechSynthesisVoice ;
const engine = this.synthesizer.engine || 'standard';
const salt = cs.callSid;
const credentials = cs.getSpeechCredentials(vendor, 'tts');