allow cartesia model_id is override from synthesizer option (#1130)

This commit is contained in:
Hoan Luu Huu
2025-03-28 00:37:57 +07:00
committed by GitHub
parent f33f197e8d
commit acdb8695a0

View File

@@ -152,7 +152,6 @@ class TtsTask extends Task {
} else if (vendor === 'deepgram') { } else if (vendor === 'deepgram') {
this.model = voice; this.model = voice;
} }
this.model_id = credentials.model_id;
/* allow for microsoft custom region voice and api_key to be specified as an override */ /* allow for microsoft custom region voice and api_key to be specified as an override */
if (vendor === 'microsoft' && this.options.deploymentId) { 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. * note on cache_speech_handles. This was found to be risky.
* It can cause a crash in the following sequence on a single call: * It can cause a crash in the following sequence on a single call: