mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
changes for azure tts
This commit is contained in:
@@ -21,19 +21,15 @@ class TaskSay extends Task {
|
||||
const {updateSpeechCredentialLastUsed} = require('../utils/db-utils')(this.logger, srf);
|
||||
const {writeAlerts, AlertType, stats} = srf.locals;
|
||||
const {synthAudio} = srf.locals.dbHelpers;
|
||||
const vendor = ('default' === this.synthesizer.vendor || !this.synthesizer.vendor) ?
|
||||
cs.speechSynthesisVendor :
|
||||
this.synthesizer.vendor;
|
||||
const language = ('default' === this.synthesizer.language || !this.synthesizer.language) ?
|
||||
cs.speechSynthesisLanguage :
|
||||
this.synthesizer.language;
|
||||
const voice = ('default' === this.synthesizer.voice || !this.synthesizer.voice) ?
|
||||
cs.speechSynthesisVoice :
|
||||
this.synthesizer.voice;
|
||||
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 salt = cs.callSid;
|
||||
const credentials = cs.getSpeechCredentials(vendor, 'tts');
|
||||
|
||||
this.logger.info(`Task:say - using vendor: ${vendor}`);
|
||||
this.logger.info({language, voice}, `Task:say - using vendor: ${vendor}`);
|
||||
this.ep = ep;
|
||||
try {
|
||||
if (!credentials) {
|
||||
|
||||
Reference in New Issue
Block a user