From c3d12fafee0d758a9673f1ac8d3268b0dca06063 Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Fri, 3 Oct 2025 21:09:19 +0700 Subject: [PATCH] support deeepgram influx (#501) * support deeepgram influx * update verb specification --- lib/routes/api/speech-credentials.js | 10 +++++----- lib/utils/speech-utils.js | 2 +- package-lock.json | 8 ++++---- package.json | 2 +- test/speech-credentials.js | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/routes/api/speech-credentials.js b/lib/routes/api/speech-credentials.js index d847bd9..4d9db11 100644 --- a/lib/routes/api/speech-credentials.js +++ b/lib/routes/api/speech-credentials.js @@ -238,10 +238,10 @@ const encryptCredential = (obj) => { }); return encrypt(resembleData); - case 'deepgramriver': - assert(api_key, 'invalid deepgram river speech credential: api_key is required'); - const deepgramriverData = JSON.stringify({api_key}); - return encrypt(deepgramriverData); + case 'deepgramflux': + assert(api_key, 'invalid deepgram flux speech credential: api_key is required'); + const deepgramfluxData = JSON.stringify({api_key}); + return encrypt(deepgramfluxData); case 'ibm': const ibmData = JSON.stringify({tts_api_key, tts_region, stt_api_key, stt_region, instance_id}); @@ -806,7 +806,7 @@ router.get('/:sid/test', async(req, res) => { } } } - else if (cred.vendor === 'deepgramriver') { + else if (cred.vendor === 'deepgramflux') { const {api_key} = credential; if (cred.use_for_stt && api_key) { try { diff --git a/lib/utils/speech-utils.js b/lib/utils/speech-utils.js index 09439af..6b63229 100644 --- a/lib/utils/speech-utils.js +++ b/lib/utils/speech-utils.js @@ -686,7 +686,7 @@ function decryptCredential(obj, credential, logger, isObscureKey = true) { obj.deepgram_tts_uri = o.deepgram_tts_uri; obj.model_id = o.model_id; } - else if ('deepgramriver' === obj.vendor) { + else if ('deepgramflux' === 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 4ad37a7..13f8aa6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22,7 +22,7 @@ "@jambonz/realtimedb-helpers": "^0.8.15", "@jambonz/speech-utils": "^0.2.23", "@jambonz/time-series": "^0.2.8", - "@jambonz/verb-specifications": "^0.0.111", + "@jambonz/verb-specifications": "^0.0.115", "@soniox/soniox-node": "^1.2.2", "ajv": "^8.17.1", "argon2": "^0.40.1", @@ -4254,9 +4254,9 @@ } }, "node_modules/@jambonz/verb-specifications": { - "version": "0.0.111", - "resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.111.tgz", - "integrity": "sha512-P2lDki5wCHGPPXpPTeMdht4NfGujF6NrLyrI8o/4U6l+2elfc/1mKl/Lz/PWGo9rQM4mTOVIhkk9ECo0NvOVoA==", + "version": "0.0.115", + "resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.115.tgz", + "integrity": "sha512-T2J5skCZBADaxePkFqpm0JYwr5Iu6e9zgvk6j0/4vD6lwK29GSoSdk2LCKUY6VH2GYdaN6r3dyIw4xpFVXuMfQ==", "license": "MIT", "dependencies": { "debug": "^4.3.4", diff --git a/package.json b/package.json index 17ef73d..834a005 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@jambonz/realtimedb-helpers": "^0.8.15", "@jambonz/speech-utils": "^0.2.23", "@jambonz/time-series": "^0.2.8", - "@jambonz/verb-specifications": "^0.0.111", + "@jambonz/verb-specifications": "^0.0.115", "@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 d47a9b2..367eb3a 100644 --- a/test/speech-credentials.js +++ b/test/speech-credentials.js @@ -930,21 +930,21 @@ test('speech credentials tests', async(t) => { auth: authUser, json: true, body: { - vendor: 'deepgramriver', + vendor: 'deepgramflux', use_for_tts: false, use_for_stt: true, api_key: 'api_key', } }); t.ok(result.statusCode === 201, 'successfully added speech credential for Verbio'); - const deepgramriverSid = result.body.sid; + const deepgramfluxSid = result.body.sid; /* delete the credential */ - result = await request.delete(`/Accounts/${account_sid}/SpeechCredentials/${deepgramriverSid}`, { + result = await request.delete(`/Accounts/${account_sid}/SpeechCredentials/${deepgramfluxSid}`, { auth: authUser, resolveWithFullResponse: true, }); - t.ok(result.statusCode === 204, 'successfully deleted speech credential deepgramriver'); + t.ok(result.statusCode === 204, 'successfully deleted speech credential deepgramflux'); /* Check google supportedLanguagesAndVoices */ result = await request.get(`/Accounts/${account_sid}/SpeechCredentials/speech/supportedLanguagesAndVoices?vendor=google`, {