mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-01-25 02:08:26 +00:00
wip
This commit is contained in:
@@ -612,11 +612,11 @@ const synthCustomVendor = async(logger, {credentials, stats, language, voice, te
|
||||
};
|
||||
|
||||
const synthElevenlabs = async(logger, {credentials, options, stats, language, voice, text, renderForCaching}) => {
|
||||
const {api_key, model_id, options: credOpts, use_streaming} = credentials;
|
||||
const {api_key, model_id, options: credOpts} = credentials;
|
||||
const opts = !!options && Object.keys(options).length !== 0 ? options : JSON.parse(credOpts || '{}');
|
||||
|
||||
/* default to using the streaming interface, unless disabled by env var OR we want just a cache file */
|
||||
if (use_streaming && !renderForCaching) {
|
||||
if (!process.env.JAMBONES_DISABLE_TTS_STREAMING && !renderForCaching) {
|
||||
let params = '';
|
||||
params += `{api_key=${api_key}`;
|
||||
params += `,model_id=${model_id}`;
|
||||
@@ -661,9 +661,9 @@ const synthElevenlabs = async(logger, {credentials, options, stats, language, vo
|
||||
};
|
||||
|
||||
const synthWhisper = async(logger, {credentials, stats, voice, text, renderForCaching}) => {
|
||||
const {api_key, model_id, baseURL, timeout, use_streaming, speed} = credentials;
|
||||
const {api_key, model_id, baseURL, timeout, speed} = credentials;
|
||||
/* if the env is set to stream then bag out, unless we are specifically rendering to generate a cache file */
|
||||
if (use_streaming && !renderForCaching) {
|
||||
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