diff --git a/breadbot.js b/breadbot.js index ada5208..8031cd2 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}.ogg`)) + })) + .pipe(fs.createWriteStream("." + path.sep + "media" + path.sep + "voice_audio" + path.sep + newCallID + path.sep + `${Date.now()}-${user_id}.pcm`)) }) } catch (error) { diff --git a/package.json b/package.json index a6864ba..c367fda 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "libsodium-wrappers": "^0.7.13", "mysql": "^2.18.1", "mysql2": "^3.6.3", - "prism-media": "^1.3.5" + "prism-media": "^2.0.0-alpha.0" }, "devDependencies": { "eslint": "^8.27.0"