From 0ba69e872bfe49903bbe9e9f252f56a0c6121ff1 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Wed, 2 Jul 2025 02:48:00 +0700 Subject: [PATCH 1/3] support assemblyai v3 (#475) * support assemblyai v3 * update verb specification --- lib/routes/api/speech-credentials.js | 5 ++++- lib/utils/speech-utils.js | 1 + package-lock.json | 8 ++++---- package.json | 2 +- test/speech-credentials.js | 3 ++- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/routes/api/speech-credentials.js b/lib/routes/api/speech-credentials.js index d68cff9..6a6f3a5 100644 --- a/lib/routes/api/speech-credentials.js +++ b/lib/routes/api/speech-credentials.js @@ -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'); diff --git a/lib/utils/speech-utils.js b/lib/utils/speech-utils.js index e323d6e..064de86 100644 --- a/lib/utils/speech-utils.js +++ b/lib/utils/speech-utils.js @@ -726,6 +726,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; diff --git a/package-lock.json b/package-lock.json index 1040f84..096df91 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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.106", "@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.106", + "resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.106.tgz", + "integrity": "sha512-xBCGKKW5QC7ItZyeF22esytpG2yIhkGWIvBgTaf97CilQmUdLGo3rWG3i7qnRvU9MPXFCtVCMt/aaMt1Ep6V2g==", "license": "MIT", "dependencies": { "debug": "^4.3.4", diff --git a/package.json b/package.json index d7ca285..3268728 100644 --- a/package.json +++ b/package.json @@ -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.106", "@soniox/soniox-node": "^1.2.2", "ajv": "^8.17.1", "argon2": "^0.40.1", diff --git a/test/speech-credentials.js b/test/speech-credentials.js index cf06da0..653f1c7 100644 --- a/test/speech-credentials.js +++ b/test/speech-credentials.js @@ -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'); From 819319dbe5b07f9740ddc7cc9e5e4782cedcb371 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Tue, 1 Jul 2025 12:43:17 -0400 Subject: [PATCH 2/3] logging --- lib/utils/speech-utils.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/utils/speech-utils.js b/lib/utils/speech-utils.js index 064de86..344cb01 100644 --- a/lib/utils/speech-utils.js +++ b/lib/utils/speech-utils.js @@ -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)); From 0d4b7e88ad8e9295e3dac310aa00890b752e6188 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Thu, 3 Jul 2025 18:15:59 +0700 Subject: [PATCH 3/3] update verb specification 0.0.107 (#479) --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 096df91..ad20ac9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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.106", + "@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.106", - "resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.106.tgz", - "integrity": "sha512-xBCGKKW5QC7ItZyeF22esytpG2yIhkGWIvBgTaf97CilQmUdLGo3rWG3i7qnRvU9MPXFCtVCMt/aaMt1Ep6V2g==", + "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", diff --git a/package.json b/package.json index 3268728..0beae4d 100644 --- a/package.json +++ b/package.json @@ -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.106", + "@jambonz/verb-specifications": "^0.0.107", "@soniox/soniox-node": "^1.2.2", "ajv": "^8.17.1", "argon2": "^0.40.1",