From 2fe89f132c940ee16f4f1f0ef2dda1c94db32aac Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 12 Feb 2024 12:41:21 -0500 Subject: [PATCH] change elevenlabs default to streaming, can be disabled by env --- lib/synth-audio.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/synth-audio.js b/lib/synth-audio.js index 9963967..fa50ea5 100644 --- a/lib/synth-audio.js +++ b/lib/synth-audio.js @@ -611,8 +611,8 @@ const synthElevenlabs = async(logger, {credentials, options, stats, language, vo const {api_key, model_id, options: credOpts} = credentials; const opts = !!options && Object.keys(options).length !== 0 ? options : JSON.parse(credOpts || '{}'); - /* if the env is set to stream then bag out, unless we are specifically rendering to generate a cache file */ - if (process.env.JAMBONES_ELEVENLABS_STREAMING && !renderForCaching) { + /* default to using the streaming interface, unless disabled by env var OR we want just a cache file */ + if (!process.env.JAMBONES_DISABLE_TTS_STREAMING && !renderForCaching) { let params = ''; params += `{api_key=${api_key}`; params += `,model_id=${model_id}`;