Trying to write just straight ogg rather than convert to PCM, which seems to be the issue

This commit is contained in:
Bradley Bickford 2023-11-21 18:06:32 -05:00
parent 0f68356254
commit ab3ef81df9

View File

@ -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) {