mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2026-10-28 22:34:26 +00:00
fix error when tts stream invoked without config
This commit is contained in:
1 parent
1984b6d3ea
commit
94543d3a0a
1 file changed
+2
-2
@@ -89,8 +89,8 @@ class TtsTask extends Task {
|
||||
// api_key, model_id, api_uri, custom_tts_streaming_url, and auth_token are encoded in the credentials
|
||||
// allow them to be overriden via config, using options
|
||||
// give preference to options passed in via config
|
||||
const local_options = {...JSON.parse(options), ...this.options};
|
||||
const local_voice_settings = {...JSON.parse(options).voice_settings, ...this.options.voice_settings};
|
||||
const local_options = {...JSON.parse(options ?? '{}'), ...this.options ?? {}};
|
||||
const local_voice_settings = {...options?.voice_settings ?? {}, ...this.options?.voice_settings ?? {}};
|
||||
const local_api_key = local_options.api_key ?? api_key;
|
||||
const local_model_id = local_options.model_id ?? model_id;
|
||||
const local_api_uri = local_options.api_uri ?? api_uri;
|
||||
|
||||
Reference in new issue
Block a user