Attempting to write raw OPUS to file

This commit is contained in:
Bradley Bickford 2023-11-24 15:02:03 -05:00
parent 00de13acd2
commit 42f04a552a

View File

@ -127,7 +127,7 @@ client.on(Events.VoiceStateUpdate, async (oldState, newState) => {
duration: 1000
}
})
.pipe(new prism.opus.OggLogicalBitstream({
/*.pipe(new prism.opus.OggLogicalBitstream({
opusHead: new prism.opus.OpusHead({
channelCount: 2,
sampleRate: 48000
@ -136,8 +136,8 @@ client.on(Events.VoiceStateUpdate, async (oldState, newState) => {
maxPackets: 10
}/*,
crc: false*/
}))
.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}.opus`))
})
} catch (error) {