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,