Merge branch 'main' into feat/478

This commit is contained in:
Sam Machin
2025-07-03 14:55:01 +01:00
committed by GitHub
5 changed files with 12 additions and 9 deletions
+4 -1
View File
@@ -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');
+1 -2
View File
@@ -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;
+4 -4
View File
@@ -22,7 +22,7 @@
"@jambonz/realtimedb-helpers": "^0.8.14",
"@jambonz/speech-utils": "^0.2.13",
"@jambonz/time-series": "^0.2.8",
"@jambonz/verb-specifications": "^0.0.104",
"@jambonz/verb-specifications": "^0.0.107",
"@soniox/soniox-node": "^1.2.2",
"ajv": "^8.17.1",
"argon2": "^0.40.1",
@@ -4270,9 +4270,9 @@
}
},
"node_modules/@jambonz/verb-specifications": {
"version": "0.0.104",
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.104.tgz",
"integrity": "sha512-G1LjK6ISujdg0zALudtUvdaPXmvA4FU6x3s8S9MwUbWbFo2WERMUcNOgQAutDZwOMrLH9DnbPL8ZIdnTCKnlkA==",
"version": "0.0.107",
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.107.tgz",
"integrity": "sha512-pkH02jUBNG9GluJdrbyO6tboN1/XANXmIoLtmKlX96VtKUGDr+li+lTGEpkMkIM+O1NjT/PSEXzGVPQwxLaKug==",
"license": "MIT",
"dependencies": {
"debug": "^4.3.4",
+1 -1
View File
@@ -33,7 +33,7 @@
"@jambonz/realtimedb-helpers": "^0.8.14",
"@jambonz/speech-utils": "^0.2.13",
"@jambonz/time-series": "^0.2.8",
"@jambonz/verb-specifications": "^0.0.104",
"@jambonz/verb-specifications": "^0.0.107",
"@soniox/soniox-node": "^1.2.2",
"ajv": "^8.17.1",
"argon2": "^0.40.1",
+2 -1
View File
@@ -791,7 +791,8 @@ test('speech credentials tests', async(t) => {
body: {
vendor: 'assemblyai',
use_for_stt: true,
api_key: "APIKEY"
api_key: "APIKEY",
service_version: 'v2'
}
});
t.ok(result.statusCode === 201, 'successfully added speech credential for assemblyai');