mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2025-12-19 05:47:46 +00:00
support whisper streaming
This commit is contained in:
@@ -228,7 +228,7 @@ const encryptCredential = (obj) => {
|
||||
case 'whisper':
|
||||
assert(api_key, 'invalid whisper speech credential: api_key is required');
|
||||
assert(model_id, 'invalid whisper speech credential: model_id is required');
|
||||
const whisperData = JSON.stringify({api_key, model_id});
|
||||
const whisperData = JSON.stringify({api_key, model_id, use_streaming});
|
||||
return encrypt(whisperData);
|
||||
|
||||
default:
|
||||
|
||||
@@ -443,6 +443,7 @@ function decryptCredential(obj, credential, logger, isObscureKey = true) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
obj.model_id = o.model_id;
|
||||
obj.use_streaming = o.use_streaming;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user