From a517f37473bd87257535bc924722921a7b170dd8 Mon Sep 17 00:00:00 2001 From: Quan HL Date: Thu, 30 Nov 2023 16:37:44 +0700 Subject: [PATCH] wip --- lib/synth-audio.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/synth-audio.js b/lib/synth-audio.js index cca45b1..f07e14b 100644 --- a/lib/synth-audio.js +++ b/lib/synth-audio.js @@ -587,7 +587,7 @@ const synthCustomVendor = async(logger, {credentials, stats, language, voice, te const synthElevenlabs = async(logger, {credentials, options, stats, language, voice, text}) => { const {api_key, model_id, options: credOpts} = credentials; - const opts = options || JSON.parse(credOpts || '{}'); + const opts = !!options && Object.keys(options).length !== 0 ? options : JSON.parse(credOpts || '{}'); const optimize_streaming_latency = opts.optimize_streaming_latency ? `?optimize_streaming_latency=${opts.optimize_streaming_latency}` : ''; try {