From e5985620c0641a9a24a200a03596bf774b39bc5d Mon Sep 17 00:00:00 2001 From: Quan HL Date: Sun, 5 May 2024 14:28:11 +0700 Subject: [PATCH 1/2] support tts stream private endpoint --- lib/synth-audio.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/synth-audio.js b/lib/synth-audio.js index ea66053..9b76f61 100644 --- a/lib/synth-audio.js +++ b/lib/synth-audio.js @@ -452,6 +452,7 @@ const synthMicrosoft = async(logger, { params += ',write_cache_file=1'; if (region) params += `,region=${region}`; if (custom_tts_endpoint) params += `,endpointId=${custom_tts_endpoint}`; + if (custom_tts_endpoint_url) params += `,endpoint=${custom_tts_endpoint_url}`; if (process.env.JAMBONES_HTTP_PROXY_IP) params += `,http_proxy_ip=${process.env.JAMBONES_HTTP_PROXY_IP}`; if (process.env.JAMBONES_HTTP_PROXY_PORT) params += `,http_proxy_port=${process.env.JAMBONES_HTTP_PROXY_PORT}`; params += '}'; From 90d6048f52103fea213180b518eebfd13c6eed14 Mon Sep 17 00:00:00 2001 From: Quan HL Date: Tue, 14 May 2024 14:01:25 +0700 Subject: [PATCH 2/2] fix private azure link with credential --- lib/synth-audio.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/synth-audio.js b/lib/synth-audio.js index 9b76f61..4da42b4 100644 --- a/lib/synth-audio.js +++ b/lib/synth-audio.js @@ -380,7 +380,7 @@ async function _synthOnPremMicrosoft(logger, { text, filePath }) { - const {use_custom_tts, custom_tts_endpoint_url} = credentials; + const {use_custom_tts, custom_tts_endpoint_url, api_key} = credentials; let content = text; if (use_custom_tts && !content.startsWith('