From acdb8695a076bac19431842d5d3b8e67489128e2 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Fri, 28 Mar 2025 00:37:57 +0700 Subject: [PATCH] allow cartesia model_id is override from synthesizer option (#1130) --- lib/tasks/tts-task.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/tasks/tts-task.js b/lib/tasks/tts-task.js index e942fdb7..0cfd4a0c 100644 --- a/lib/tasks/tts-task.js +++ b/lib/tasks/tts-task.js @@ -152,7 +152,6 @@ class TtsTask extends Task { } else if (vendor === 'deepgram') { this.model = voice; } - this.model_id = credentials.model_id; /* allow for microsoft custom region voice and api_key to be specified as an override */ if (vendor === 'microsoft' && this.options.deploymentId) { @@ -193,8 +192,12 @@ class TtsTask extends Task { }; } } + } else if (vendor === 'cartesia') { + credentials.model_id = this.options.model_id || credentials.model_id; } + this.model_id = credentials.model_id; + /** * note on cache_speech_handles. This was found to be risky. * It can cause a crash in the following sequence on a single call: