mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-10-29 19:04:12 +00:00
add use_streaming flag for elevenlabs and whisper (#290)
* add use_streaming flag for elevenlabs (not for whisper yet) --------- Co-authored-by: Dave Horton <daveh@beachdognet.com>
This commit is contained in:
1 parent
68d73345ef
commit
256ca440a0
2 files changed
+8
-4
No files matched your search
@@ -133,7 +133,8 @@ const encryptCredential = (obj) => {
|
||||
auth_token = '',
|
||||
cobalt_server_uri,
|
||||
model_id,
|
||||
options
|
||||
options,
|
||||
use_streaming
|
||||
} = obj;
|
||||
|
||||
switch (vendor) {
|
||||
@@ -211,7 +212,7 @@ const encryptCredential = (obj) => {
|
||||
case 'elevenlabs':
|
||||
assert(api_key, 'invalid elevenLabs speech credential: api_key is required');
|
||||
assert(model_id, 'invalid elevenLabs speech credential: model_id is required');
|
||||
const elevenlabsData = JSON.stringify({api_key, model_id, options});
|
||||
const elevenlabsData = JSON.stringify({api_key, model_id, options, use_streaming});
|
||||
return encrypt(elevenlabsData);
|
||||
|
||||
case 'assemblyai':
|
||||
@@ -413,7 +414,8 @@ router.put('/:sid', async(req, res) => {
|
||||
custom_tts_url,
|
||||
cobalt_server_uri,
|
||||
model_id,
|
||||
options
|
||||
options,
|
||||
use_streaming
|
||||
} = req.body;
|
||||
|
||||
const newCred = {
|
||||
@@ -436,7 +438,8 @@ router.put('/:sid', async(req, res) => {
|
||||
custom_tts_url,
|
||||
cobalt_server_uri,
|
||||
model_id,
|
||||
options
|
||||
options,
|
||||
use_streaming
|
||||
};
|
||||
logger.info({o, newCred}, 'updating speech credential with this new credential');
|
||||
obj.credential = encryptCredential(newCred);
|
||||
|
||||
Reference in new issue
Block a user