boppleopple
boppleopple
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
once i have internet back home i’ll work on it again
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
(also i am a 6 hour drive away atm)
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
sorry, i got absolutely ruined by a storm in maine a day after posting that, i lost power for 4 days and internet still hasn’t come back
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
i'm gonna try and just simplify this program on another branch tomorrow, do you know a good program i can reference for piping a custom readable into discordjs? don't worry about it if not, but i think i'm fundamentally misunderstanding something about node streams and that would help more than another documentation tab at this point
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
update: i have switched to a readable instead of a readablestream to fix that issue, but now the readable stops getting called after 4 _read calls?
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
i dont think i can do anything with streamtype opus as long as i get this before any audio is processed
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
i'm sorry to keep bringing this up, but it was really my original question: do i need to change the type of stream i'm inputting or something to avoid this constructor error:
TypeError: this.playStream.once is not a function
at new AudioResource (file:///home/bopple/Desktop/Code/linux-sharing-bot/node_modules/@discordjs/voice/dist/index.mjs:2319:21)
at createAudioResource (file:///home/bopple/Desktop/Code/linux-sharing-bot/node_modules/@discordjs/voice/dist/index.mjs:2397:12)
at Socket.<anonymous> (file:///home/bopple/Desktop/Code/linux-sharing-bot/app.js:82:22)
at Socket.emit (node:events:519:28)
at startListening (node:dgram:183:10)
at node:dgram:371:7
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
TypeError: this.playStream.once is not a function
at new AudioResource (file:///home/bopple/Desktop/Code/linux-sharing-bot/node_modules/@discordjs/voice/dist/index.mjs:2319:21)
at createAudioResource (file:///home/bopple/Desktop/Code/linux-sharing-bot/node_modules/@discordjs/voice/dist/index.mjs:2397:12)
at Socket.<anonymous> (file:///home/bopple/Desktop/Code/linux-sharing-bot/app.js:82:22)
at Socket.emit (node:events:519:28)
at startListening (node:dgram:183:10)
at node:dgram:371:7
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
the acodec is correct, i think
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
oooh maybe
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
so i still need to do that if the incoming data is opus as well?
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
or rather just not opus
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
i only ever get this far if i switch the streamtype to raw
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
1. I still get a garbled stream if I use raw (and switch to s16le audio format in ffmpeg) 2. opus streams still throw that random error from the audioplayer constructor
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
I think msg is a buffer?
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
and even if i do make it past that error (for now just by switching audio formats) i do still get a typeerror if i change that line you mentioned earlier:
node:buffer:1086
return this.utf8Write(string, 0, this.length);
^

TypeError: argument must be a string
at Buffer.write (node:buffer:1086:17)
at Socket.<anonymous> (file:///home/bopple/Desktop/Code/linux-sharing-bot/udpServer.js:68:25)
at Socket.emit (node:events:531:35)
at UDP.onMessage [as onmessage] (node:dgram:942:8) {
code: 'ERR_INVALID_ARG_TYPE'
}
node:buffer:1086
return this.utf8Write(string, 0, this.length);
^

TypeError: argument must be a string
at Buffer.write (node:buffer:1086:17)
at Socket.<anonymous> (file:///home/bopple/Desktop/Code/linux-sharing-bot/udpServer.js:68:25)
at Socket.emit (node:events:531:35)
at UDP.onMessage [as onmessage] (node:dgram:942:8) {
code: 'ERR_INVALID_ARG_TYPE'
}
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
and there are no debug messages before it crashes, even with the audioplayer option passed
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
I was still getting debug messages without that beforehand?
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
yeah, the error does in fact persist
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
i can fix the buffer issue, but i think that error will persist if i change that, i think i get a type mismatch
32 replies
DIAdiscord.js - Imagine an app
Created by boppleopple on 12/17/2023 in #djs-voice
piping from udp stream into an audio resource
i don't need to worry about the hash right now (im refactoring that later, right now there is only one user so it doesn't matter)
32 replies