TheUntitledGoose
DIdiscord.js - Imagine ❄
•Created by TheUntitledGoose on 1/14/2025 in #djs-questions
Discord.js voice resampling issues.
Not sure if this goes in djs-questions or other-js-ts
Hello! Currently I'm trying to get voice recognition on my discord bot through voice chat using Vosk, and I'm getting there however, I do not know how to resample the voice stream I am provided via
connection.receiver.subscribe
.
This isn't exactly to do with discord.js but any help would still be appreciated 🙂
Here's my code for context:
Whenever I do anything with opusStream it continually throws RangeError [ERR_OUT_OF_RANGE]: The value of "sourceEnd" is out of range. It must be >= 0 && <= 3. Received 8
at the end of the stream.
After I record my audio again it throws: Error [ERR_STREAM_PUSH_AFTER_EOF]: stream.push() after EOF
I think discord gives 48kHz audio back, but I need it in 16kHz.
DISCORD.JS Version: 14.17.2
DISCORD.JS@Voice Version: 0.18.020 replies