diff --git a/.gitignore b/.gitignore index 0f96090..535317d 100644 --- a/.gitignore +++ b/.gitignore @@ -29,8 +29,8 @@ ttsvc.mp3 music.mp3 dectalk.wav dectalkvc.wav -sam.mp3 -samvc.mp3 +sam.wav +samvc.wav # json diff --git a/commands/fun/tts/sam.js b/commands/fun/tts/sam.js index 1bbea88..b0e5899 100644 --- a/commands/fun/tts/sam.js +++ b/commands/fun/tts/sam.js @@ -72,9 +72,9 @@ class samCommand extends Command { 'Content-Type': 'audio/mpeg', }, }).then((result) => { - const outputFilename = './sam.mp3'; + const outputFilename = './sam.wav'; fs.writeFileSync(outputFilename, result.data); - return message.channel.send({files: ['./sam.mp3']}); + return message.channel.send({files: ['./sam.wav']}); }); } diff --git a/commands/fun/tts/samvc.js b/commands/fun/tts/samvc.js index 9981663..9b74cd6 100644 --- a/commands/fun/tts/samvc.js +++ b/commands/fun/tts/samvc.js @@ -72,14 +72,15 @@ class samvcCommand extends Command { 'Content-Type': 'audio/mpeg', }, }).then(async (result) => { - const outputFilename = './samvc.mp3'; + const outputFilename = './samvc.wav'; + fs.writeFile(outputFilename, result.data, async function(err) { if (err) console.error(err); const voiceChannel = message.member.voice.channel; if (!voiceChannel) return message.say('Please enter a voice channel first.'); try { const connection = await voiceChannel.join(); - const dispatcher = connection.play('./dectalkvc.wav'); + const dispatcher = connection.play('./samvc.wav'); dispatcher.once('finish', () => voiceChannel.leave()); dispatcher.once('error', () => voiceChannel.leave()); return null; diff --git a/sam.mp3 b/sam.mp3 new file mode 100644 index 0000000..4c72b9a Binary files /dev/null and b/sam.mp3 differ