support mod_dub

This commit is contained in:
Quan HL
2024-03-09 16:59:00 +07:00
parent 04a2466f54
commit c3188e40bb
+3
View File
@@ -619,6 +619,8 @@ const synthElevenlabs = async(logger, {credentials, options, stats, language, vo
if (!process.env.JAMBONES_DISABLE_TTS_STREAMING && !renderForCaching) {
let params = '';
params += `{api_key=${api_key}`;
params += ',vendor=elevenlabs';
params += ',voice=${voice}';
params += `,model_id=${model_id}`;
params += `,optimize_streaming_latency=${opts.optimize_streaming_latency || 2}`;
params += ',write_cache_file=1';
@@ -667,6 +669,7 @@ const synthWhisper = async(logger, {credentials, stats, voice, text, renderForCa
let params = '';
params += `{api_key=${api_key}`;
params += `,model_id=${model_id}`;
params += ',vendor=whisper';
params += `,voice=${voice}`;
params += ',write_cache_file=1';
if (speed) params += `,speed=${speed}`;