From b95a593182b8a1121fd138cc5a8343fab3e785db Mon Sep 17 00:00:00 2001 From: Hoan Luu Huu <110280845+xquanluu@users.noreply.github.com> Date: Thu, 5 Mar 2026 19:17:52 +0700 Subject: [PATCH] fixed houndify speech credential validation skiped if custom endpoint provided (#522) --- lib/utils/speech-utils.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/utils/speech-utils.js b/lib/utils/speech-utils.js index ff6cee9..46d84b4 100644 --- a/lib/utils/speech-utils.js +++ b/lib/utils/speech-utils.js @@ -661,9 +661,16 @@ const testAssemblyStt = async(logger, credentials) => { }; const testHoundifyStt = async(logger, credentials) => { - const {client_id, client_key, user_id} = credentials; + const {client_id, client_key, user_id, houndify_server_uri} = credentials; return new Promise((resolve, reject) => { + // api-server use houndify js sdk, which connect to wss server + // freeswitch modules use houndify c/c++ sdk, which connect to https server + // we cannot test credentials on https server here. + if (houndify_server_uri) { + return true; + } + try { // Read the test audio file const audioBuffer = fs.readFileSync(`${__dirname}/../../data/test_audio.wav`); @@ -680,8 +687,6 @@ const testHoundifyStt = async(logger, credentials) => { Latitude: 37.388309, Longitude: -121.973968, }, - // custom endpint is used only for feature server. - // ...(houndify_server_uri && {endpoint: houndify_server_uri}), // Audio format configuration sampleRate: 16000,