mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-10-31 11:54:12 +00:00
check playht can fetch voices when adding new speech credential (#309)
* check playht can fetch voices when adding new speech credential * wip * wip * wip * wip
This commit is contained in:
1 parent
b21d10eb3e
commit
80418aa7e5
2 files changed
+23
-3
No files matched your search
@@ -743,7 +743,12 @@ router.get('/:sid/test', async(req, res) => {
|
||||
results.tts.status = 'ok';
|
||||
SpeechCredential.ttsTestResult(sid, true);
|
||||
} catch (err) {
|
||||
results.tts = {status: 'fail', reason: err.message};
|
||||
let reason = err.message;
|
||||
// if error is from bent, let get the body
|
||||
try {
|
||||
reason = await err.text();
|
||||
} catch {}
|
||||
results.tts = {status: 'fail', reason};
|
||||
SpeechCredential.ttsTestResult(sid, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user