From ed5921b97b0c8caff85c41277bf5460d13e30f0c Mon Sep 17 00:00:00 2001 From: oddsix Date: Tue, 18 Nov 2025 22:24:52 -0500 Subject: [PATCH] incorporate parsed options --- lib/tasks/tts-task.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/tasks/tts-task.js b/lib/tasks/tts-task.js index 3424df9e..83280ed3 100644 --- a/lib/tasks/tts-task.js +++ b/lib/tasks/tts-task.js @@ -89,8 +89,9 @@ 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 = {...options?.voice_settings ?? {}, ...this.options?.voice_settings ?? {}}; + const parsed_options = JSON.parse(options ?? '{}'); + const local_options = {...parsed_options, ...this.options ?? {}}; + const local_voice_settings = {...parsed_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;