From ab3ef81df93281f0b2bda1659c41c7d9aced25d3 Mon Sep 17 00:00:00 2001 From: Bradley Bickford Date: Tue, 21 Nov 2023 18:06:32 -0500 Subject: [PATCH] Trying to write just straight ogg rather than convert to PCM, which seems to be the issue --- breadbot.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/breadbot.js b/breadbot.js index 8031cd2..ada5208 100644 --- a/breadbot.js +++ b/breadbot.js @@ -127,13 +127,13 @@ client.on(Events.VoiceStateUpdate, async (oldState, newState) => { duration: 1000 } }) - .pipe(new prism.opus.OggDemuxer()) + /*.pipe(new prism.opus.OggDemuxer()) .pipe(new prism.opus.Decoder({ rate: 48000, channels: 2, frameSize: 960 - })) - .pipe(fs.createWriteStream("." + path.sep + "media" + path.sep + "voice_audio" + path.sep + newCallID + path.sep + `${Date.now()}-${user_id}.pcm`)) + }))*/ + .pipe(fs.createWriteStream("." + path.sep + "media" + path.sep + "voice_audio" + path.sep + newCallID + path.sep + `${Date.now()}-${user_id}.ogg`)) }) } catch (error) {