Skip to content

Commit

Permalink
fix review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
xquanluu committed Oct 31, 2024
1 parent 115faa9 commit 153ac3f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/synth-audio.js
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ const synthPolly = async(createHash, retrieveHash, logger,
const synthGoogle = async(logger, {credentials, stats, language, voice, gender, text}) => {
const client = new ttsGoogle.TextToSpeechClient(credentials);
// If google custom voice cloning is used.
// At this time 31 Oct 2024, google node sdk has not support cloning voice yet.
// At this time 31 Oct 2024, google node sdk has not support voice cloning yet.
if (typeof voice === 'object' && voice.voice_cloning_key) {
try {
const accessToken = await client.auth.getAccessToken();
Expand Down Expand Up @@ -383,8 +383,8 @@ const synthGoogle = async(logger, {credentials, stats, language, voice, gender,
}
};

const mp3 = await post('/v1beta1/text:synthesize', payload);
return Buffer.from(mp3.audioContent, 'base64');
const wav = await post('/v1beta1/text:synthesize', payload);
return Buffer.from(wav.audioContent, 'base64');
} catch (err) {
logger.info({err: await err.text()}, 'synthGoogle returned error');
throw err;
Expand Down

0 comments on commit 153ac3f

Please sign in to comment.