Open RisedSky opened 3 years ago
I don't know if it's because i'm tired, or if i didn't set something, if you have any idea, tell me, will re-check tomorrow :)
Okay so i have finally found a FIX !! Here is the code to fix this strange error :
const oggStream = new opus.OggLogicalBitstream(
{
opusHead: new opus.OpusHead({
channelCount: 2,
sampleRate: 48000,
}),
pageSizeControl: {
maxPackets: 10,
},
crc: false
}
);
crc: false
This basically disables crc
Issue: When recording the audio of a user, it causes an error (discord.js)
Steps to reproduce:
Install nodejs, use Discord, initiate your discord bot, use theses packages:
Use this code to initiate a connection betwwen the bot and the user, and so to record his voice :
I'm using the exact same code here : https://github.com/discordjs/voice/blob/main/examples/recorder/src/createListeningStream.ts but using it in javascript, installed typescript to have compatibility working, returning me this error when speaking:
Further details: