mirror of
https://github.com/jambonz/speech-utils.git
synced 2026-07-23 20:51:49 +00:00
update review
This commit is contained in:
+5
-5
@@ -123,9 +123,9 @@ async function synthAudio(client, logger, stats, { account_sid,
|
||||
assert.ok(credentials.api_key, 'synthAudio requires api_key when elevenlabs is used');
|
||||
assert.ok(credentials.model_id, 'synthAudio requires model_id when elevenlabs is used');
|
||||
} else if ('whisper' === vendor) {
|
||||
assert.ok(voice, 'synthAudio requires voice when openai is used');
|
||||
assert.ok(credentials.model, 'synthAudio requires model when openai is used');
|
||||
assert.ok(credentials.api_key, 'synthAudio requires api_key when openai is used');
|
||||
assert.ok(voice, 'synthAudio requires voice when whisper is used');
|
||||
assert.ok(credentials.model, 'synthAudio requires model when whisper is used');
|
||||
assert.ok(credentials.api_key, 'synthAudio requires api_key when whisper is used');
|
||||
} else if (vendor.startsWith('custom')) {
|
||||
assert.ok(credentials.custom_tts_url, `synthAudio requires custom_tts_url in credentials when ${vendor} is used`);
|
||||
}
|
||||
@@ -603,7 +603,7 @@ const synthElevenlabs = async(logger, {credentials, stats, language, voice, text
|
||||
});
|
||||
return mp3;
|
||||
} catch (err) {
|
||||
logger.info({err}, 'synthEvenlabs returned error');
|
||||
logger.info({err}, 'synth Elevenlabs returned error');
|
||||
stats.increment('tts.count', ['vendor:elevenlabs', 'accepted:no']);
|
||||
throw err;
|
||||
}
|
||||
@@ -626,7 +626,7 @@ const synthWhisper = async(logger, {credentials, stats, voice, text}) => {
|
||||
});
|
||||
return Buffer.from(await mp3.arrayBuffer());
|
||||
} catch (err) {
|
||||
logger.info({err}, 'synthEvenlabs returned error');
|
||||
logger.info({err}, 'synth whisper returned error');
|
||||
stats.increment('tts.count', ['vendor:openai', 'accepted:no']);
|
||||
throw err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user