Skip to content

Commit

Permalink
remove use_streaming from speech credential (#294)
Browse files Browse the repository at this point in the history
* remove use_streaming from speech credential

* wip
  • Loading branch information
xquanluu authored Feb 20, 2024
1 parent 32b317a commit bd8fb2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
7 changes: 2 additions & 5 deletions lib/routes/api/speech-credentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,7 @@ const encryptCredential = (obj) => {
auth_token = '',
cobalt_server_uri,
model_id,
options,
use_streaming
options
} = obj;

switch (vendor) {
Expand Down Expand Up @@ -217,7 +216,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, use_streaming});
const elevenlabsData = JSON.stringify({api_key, model_id, options});
return encrypt(elevenlabsData);

case 'assemblyai':
Expand Down Expand Up @@ -420,7 +419,6 @@ router.put('/:sid', async(req, res) => {
cobalt_server_uri,
model_id,
options,
use_streaming,
deepgram_stt_uri,
deepgram_stt_use_tls,
} = req.body;
Expand All @@ -446,7 +444,6 @@ router.put('/:sid', async(req, res) => {
cobalt_server_uri,
model_id,
options,
use_streaming,
deepgram_stt_uri,
deepgram_stt_use_tls,
};
Expand Down
1 change: 0 additions & 1 deletion lib/utils/speech-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ function decryptCredential(obj, credential, logger, isObscureKey = true) {
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
obj.model_id = o.model_id;
obj.options = o.options;
obj.use_streaming = o.use_streaming;
} else if (obj.vendor.startsWith('custom:')) {
const o = JSON.parse(decrypt(credential));
obj.auth_token = isObscureKey ? obscureKey(o.auth_token) : o.auth_token;
Expand Down

0 comments on commit bd8fb2f

Please sign in to comment.