mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-07-23 20:51:49 +00:00
change elevenlabs default to streaming, can be disabled by env
This commit is contained in:
+2
-2
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user