Listen to user vocal input using connection
hey, i couldn't find any reliable form of making the client listen to vocal input when its connected.
can i have some guidance about it?
3 Replies
• What's your exact discord.js
npm list discord.js
and node node -v
version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.thanks boss
hey, using the speaking map i've set an eventListener like this:
I've noticed a lot of people were using the connection.subscribe(userid) option and get data by chunks but i haven't really come around it yet.
is there a way to do so without chunks, only using the voicemap?
in addition, i tried looking for your advice to take example from the voice-example github repository.
I could not find anything of the sort, probably missing it i searched on the main development github repository with no success.
thank you very much!
do you maybe know why this is happening?
'errored' friend from the stream object:
errored: Error [ERR_STREAM_PUSH_AFTER_EOF]: stream.push() after EOF
at new NodeError (node:internal/errors:371:5)
at readableAddChunk (node:internal/streams/readable:277:30)
at AudioReceiveStream.Readable.push (node:internal/streams/readable:228:10)
at AudioReceiveStream.push (file:///C:/Users/User/Desktop/Root/Development/Discord%20Bot/ShiraBetzibur/node_modules/@discordjs/voice/dist/index.mjs:1306:18)
at VoiceReceiver.onUdpMessage (file:///C:/Users/User/Desktop/Root/Development/Discord%20Bot/ShiraBetzibur/node_modules/@discordjs/voice/dist/index.mjs:1542:16)
at VoiceUDPSocket.emit (node:events:526:28)
at VoiceUDPSocket.onMessage (file:///C:/Users/User/Desktop/Root/Development/Discord%20Bot/ShiraBetzibur/node_modules/@discordjs/voice/dist/index.mjs:262:10)
at Socket.<anonymous> (file:///C:/Users/User/Desktop/Root/Development/Discord%20Bot/ShiraBetzibur/node_modules/@discordjs/voice/dist/index.mjs:249:48)
at Socket.emit (node:events:526:28)
at UDP.onMessage [as onmessage] (node:dgram:922:8) {
code: 'ERR_STREAM_PUSH_AFTER_EOF'
v16.14.2
oh, nice. is there an FAQ channel i can look for questions like this as i don't want to bother you too much
🙂
i think the example is deprecated as prism opus does not have oggLogicalBitStream or Opushead..
const oggStream = new prism.opus.OggLogicalBitstream({
opusHead: new prism.opus.OpusHead({
channelCount: 2,
sampleRate: 48000
}),
pageSizeControl: {
maxPackets: 10
}
});
and good morning 🙂
do you know any other again. when i tried to use the prism library it stated i need to use node-crc, when i tried to installed it i got these errors:
probably stating i need cargo and rust so i installed them.
my question is im using heroku and i haven't really find a way to install rust buildpack for heroku. can i dodge this maybe?
have you encountered this issue?