fixes for ibm speech

This commit is contained in:
Dave Horton
2022-11-25 10:55:57 -05:00
parent 5e070324ae
commit 7bb78a9a2a

View File

@@ -195,6 +195,13 @@ router.get('/', async(req, res) => {
const o = JSON.parse(decrypt(credential));
obj.api_key = obscureKey(o.api_key);
}
else if ('ibm' === obj.vendor) {
const o = JSON.parse(decrypt(credential));
obj.tts_api_key = obscureKey(o.tts_api_key);
obj.tts_region = o.tts_region;
obj.stt_api_key = obscureKey(o.stt_api_key);
obj.stt_region = o.stt_region;
}
return obj;
}));
} catch (err) {
@@ -249,6 +256,13 @@ router.get('/:sid', async(req, res) => {
const o = JSON.parse(decrypt(credential));
obj.api_key = obscureKey(o.api_key);
}
else if ('ibm' === obj.vendor) {
const o = JSON.parse(decrypt(credential));
obj.tts_api_key = obscureKey(o.tts_api_key);
obj.tts_region = o.tts_region;
obj.stt_api_key = obscureKey(o.stt_api_key);
obj.stt_region = o.stt_region;
}
res.status(200).json(obj);
} catch (err) {
sysError(logger, res, err);