mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-07-04 19:21:53 +00:00
check playht can fetch voices when adding new speech credential
This commit is contained in:
@@ -256,6 +256,14 @@ const testPlayHT = async(logger, synthAudio, credentials) => {
|
||||
text: 'Hi there and welcome to jambones!'
|
||||
}
|
||||
);
|
||||
// Test if playHT can fetch voices
|
||||
const get = bent('https://api.play.ht', 'GET', 'json', {
|
||||
'AUTHORIZATION' : credentials.api_key,
|
||||
'X-USER-ID': credentials.user_id,
|
||||
'Accept': 'application/json'
|
||||
});
|
||||
|
||||
await Promise.all([ get('/api/v2/cloned-voices'), get('/api/v2/voices')]);
|
||||
} catch (err) {
|
||||
logger.info({err}, 'synth Playht returned error');
|
||||
throw err;
|
||||
|
||||
Reference in New Issue
Block a user