Modifying versions and restoring the PCM version of audio saving

This commit is contained in:
Bradley Bickford 2023-11-21 18:46:06 -05:00
parent ab3ef81df9
commit 16b41fad2b
2 changed files with 4 additions and 4 deletions

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}.ogg`))
}))
.pipe(fs.createWriteStream("." + path.sep + "media" + path.sep + "voice_audio" + path.sep + newCallID + path.sep + `${Date.now()}-${user_id}.pcm`))
})
} catch (error) {

View File

@ -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"