Update say task and add possibility to use elevenlabs options (#556)

* Update say task and add possibility to use elevenlabs options from synthesizer

* revert ms change

* fix contdition for alerting

---------

Co-authored-by: Markus Frindt <m.frindt@cognigy.com>
This commit is contained in:
Markus Frindt
2023-12-01 15:51:22 +01:00
committed by GitHub
parent c66ad39001
commit 86a14daf79

View File

@@ -86,6 +86,13 @@ class TaskSay extends Task {
credentials.api_key = this.options.apiKey || credentials.apiKey; credentials.api_key = this.options.apiKey || credentials.apiKey;
credentials.region = this.options.region || credentials.region; credentials.region = this.options.region || credentials.region;
voice = this.options.voice || voice; voice = this.options.voice || voice;
} else if (vendor === 'elevenlabs') {
credentials = credentials || {};
credentials.model_id = this.options.model_id || credentials.model_id;
credentials.voice_settings = this.options.voice_settings || {};
credentials.optimize_streaming_latency = this.options.optimize_streaming_latency
|| credentials.optimize_streaming_latency;
voice = this.options.voice_id || voice;
} }
this.logger.info({vendor, language, voice, model}, 'TaskSay:exec'); this.logger.info({vendor, language, voice, model}, 'TaskSay:exec');