mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-07-24 04:52:03 +00:00
Merge branch 'main' into feat/478
This commit is contained in:
@@ -158,6 +158,7 @@ const encryptCredential = (obj) => {
|
||||
user_id,
|
||||
voice_engine,
|
||||
engine_version,
|
||||
service_version,
|
||||
options
|
||||
} = obj;
|
||||
|
||||
@@ -292,7 +293,7 @@ const encryptCredential = (obj) => {
|
||||
|
||||
case 'assemblyai':
|
||||
assert(api_key, 'invalid assemblyai speech credential: api_key is required');
|
||||
const assemblyaiData = JSON.stringify({api_key});
|
||||
const assemblyaiData = JSON.stringify({api_key, service_version});
|
||||
return encrypt(assemblyaiData);
|
||||
|
||||
case 'voxist':
|
||||
@@ -516,6 +517,7 @@ router.put('/:sid', async(req, res) => {
|
||||
deepgram_tts_uri,
|
||||
playht_tts_uri,
|
||||
engine_version,
|
||||
service_version,
|
||||
speechmatics_stt_uri
|
||||
} = req.body;
|
||||
|
||||
@@ -548,6 +550,7 @@ router.put('/:sid', async(req, res) => {
|
||||
deepgram_tts_uri,
|
||||
playht_tts_uri,
|
||||
engine_version,
|
||||
service_version,
|
||||
speechmatics_stt_uri
|
||||
};
|
||||
logger.info({o, newCred}, 'updating speech credential with this new credential');
|
||||
|
||||
@@ -636,7 +636,6 @@ function decryptCredential(obj, credential, logger, isObscureKey = true) {
|
||||
obj.role_arn = o.role_arn;
|
||||
obj.secret_access_key = isObscureKey ? obscureKey(o.secret_access_key) : o.secret_access_key;
|
||||
obj.aws_region = o.aws_region;
|
||||
logger.info({obj, o}, 'retrieving aws speech credential');
|
||||
}
|
||||
else if ('microsoft' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
@@ -648,7 +647,6 @@ function decryptCredential(obj, credential, logger, isObscureKey = true) {
|
||||
obj.use_custom_stt = o.use_custom_stt;
|
||||
obj.custom_stt_endpoint = o.custom_stt_endpoint;
|
||||
obj.custom_stt_endpoint_url = o.custom_stt_endpoint_url;
|
||||
logger.info({obj, o}, 'retrieving azure speech credential');
|
||||
}
|
||||
else if ('wellsaid' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
@@ -726,6 +724,7 @@ function decryptCredential(obj, credential, logger, isObscureKey = true) {
|
||||
} else if ('assemblyai' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
obj.service_version = o.service_version;
|
||||
} else if ('voxist' === obj.vendor) {
|
||||
const o = JSON.parse(decrypt(credential));
|
||||
obj.api_key = isObscureKey ? obscureKey(o.api_key) : o.api_key;
|
||||
|
||||
Reference in New Issue
Block a user