Skip to content

Commit

Permalink
update review
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Nov 9, 2023
1 parent 73baa81 commit 750ed97
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/synth-audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}
Expand Down Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 750ed97

Please sign in to comment.