is there any basic codes in js
i was learning discord voice from voice examples by discord from github but all adapter and helper codes are in typescript and my bot is javascript.
Discord Voice Lags Progressively
I’m using the latest discord.js and @discordjs/voice libraries, and I’m seeing a reproducible delay issue: when the bot plays a sound, Discord instantly shows the green speaking ring, but the audible audio arrives noticeably later (hundreds of milliseconds). The strange part is that this delay only happens when the bot stays connected; if I destroy the voice connection and rejoin the channel before each play, the delay completely disappears. I’ve tested with pre-encoded Ogg/Opus files (no FFmpeg at play time), a single AudioPlayer, different regions, and multiple listening clients. The bot triggers playback instantly, but with a long-lived voice connection the audio seems buffered or delayed, while a fresh connection plays immediately as expected. This makes it look like something in the voice pipeline accumulates delay over time. Is this a known issue, or is there a way to reset the audio/jitter buffer without reconnecting on every play?
```
...
Discord Voice Lag
I’m using the latest discord.js and @discordjs/voice libraries, and I’m seeing a reproducible delay issue: when the bot plays a sound, Discord instantly shows the green speaking ring, but the audible audio arrives noticeably later (hundreds of milliseconds). The strange part is that this delay only happens when the bot stays connected; if I destroy the voice connection and rejoin the channel before each play, the delay completely disappears. I’ve tested with pre-encoded Ogg/Opus files (no FFmpeg at play time), a single AudioPlayer, different regions, and multiple listening clients. The bot triggers playback instantly, but with a long-lived voice connection the audio seems buffered or delayed, while a fresh connection plays immediately as expected. This makes it look like something in the voice pipeline accumulates delay over time. Is this a known issue, or is there a way to reset the audio/jitter buffer without reconnecting on every play?
```
...
No Sound upon connect
Hey Team!
Hope you are all well and had a good halloween. I'm trying to create a /play command which will fetch a URL.mp3, but when the bot joins the channel it doesn't actually play or theres no sound...
Multibot System Question
I’m working on a system where bots (agents) are assigned to specific channels and play sounds when users join those channels.
For example:
• Bot1 is assigned to Channel1
• Bot2 is assigned to Channel2...
Can't install @discordjs/opus
Okk, sooo... i was trying to download it and i'm receiving this error
error: https://pastecode.io/s/u5npy6g2
Could someone help me plsss?...
What Is This Error
throw new Error(`No compatible encryption modes. Available include: ${options.join(", ")}`);
^
Error: No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize, xsalsa20_poly1305_lite_rtpsize
throw new Error(`No compatible encryption modes. Available include: ${options.join(", ")}`);
^
Error: No compatible encryption modes. Available include: aead_aes256_gcm_rtpsize, aead_xchacha20_poly1305_rtpsize, xsalsa20_poly1305_lite_rtpsize
Listening to the voice channel without specifying a user
I remember a code block about this on
discord.js; however, I looked at the methods and searched the internet. Couldn't find it.
Maybe I remember wrong :Thonk:...noise that happens on the bot
I need help fixing the noise that happens on the bot audio not the original video
Version 0.19.0 stuck in connecting state
Discord Voice Connection Stuck in "Connecting" State After @discordjs/voice v0.19.0 Upgrade
Setup:
• discord.js@14.21.0
• @discordjs/voice@0.19.0 (upgraded from 0.18.0)...
Unable to decode opus packets from VoiceReceiver with dave encryption users
--------------------------------------------------
Core Dependencies
- @discordjs/voice: 0.19.0
- prism-media: 1.3.5
...
Issues receiving and decoding opus from browser/vencord clients
I am able to successfully decode opus data to pcm from other users except my friend who is using the vencord client which apparently uses the discord web client as a base. The decode function doesn't error and I receive unplayable pcm data.

NEED HELP WITH TOKEN
Hello everyone,
I'm completely stuck on a persistent
TokenInvalid error when deploying my bot on Render and I would really appreciate some help.
I know this is a common error, but I have already tried every possible solution I could find, including:...bot cannot connect
```js
const connection = joinVoiceChannel({
channelId: channel.id,
guildId: channel.guild.id,
adapterCreator: channel.guild.voiceAdapterCreator,...
Multi-socket logic for audio stream
Anyone could explain the logic for multi sockets of using discord voice for streaming different audio url streams across multiple guilds? Current logic, I know how to do is a single socket, but after some time the bot start disconnecting from voice channels because of it. Thanks for any tea spoons of taste
Bot Voice Connection Issues
I recently have gotten reports from users about my bot having issues staying connected to the voice channel in specific communities. More specifically, a yellow exclamation point appears on the bot in the voice channel and flickers in and out, indicating that the bot is having trouble staying connected. Furthermore, most likely as a result from this connection problem, the bot will end up repeating audio which I've told it to play (usually it repeats it once instead of just playing it once). Sometimes it will not play audio at all. The behavior is usually that it will join and play the audio successfully the first time, and then fail to play or repeat the playing of the message when the audio is played the second time. I've tried having the users in the affected community change the voice region to be closer to the bots hosting provider and also closer to their own location. Despite this, the issue persists and I am not able to replicate the problem in my own Discord community (even when switching voice regions, etc). Any advice?
Dependency Report:
```
--------------------------------------------------...

Bot Voice Connection Issues
I recently have gotten reports from users about my bot having issues staying connected to the voice channel in specific communities. More specifically, it shows a yellow exclamation point appears on the bot in the voice channel and flickers in and out, indicating that the bot is having trouble staying connected. Furthermore, most likely as a result from this connection problem, the bot will end up repeating audio which I've told it to play (usually it repeats it once instead of just playing it o...
Is it possible to record as WAV?
I'm currently working on a bot that listens to a user and kicks them from the voice chat if they say a banned word. Right now, it's working but a bit buggy. It currently saves a .pcm file when a user talks, and sends the filename to a python endpoint I'm hosting locally. Python converts to mp3 via ffmpeg and then transcribes the audio to text via openai's whisper library before returning whether or not to kick the user based on the trabscribed text. My issue is that the ffmpeg is causing a lot of latency, I was wondering if I can record straight to WAV instead since (as far as I understand) WAV is sort of like PCM with additional headers? If not possible not sure if anyone knows how hard it is to add those headers myself. Ultimately looking to reduce latency by getting rid of ffmpeg in the middle...
Thanks!...
Pure-js PCM Resampler lib @purinton/resampler
https://github.com/purinton/resampler
A pure JavaScript, high-quality PCM audio resampler for Node.js. Converts s16le PCM between arbitrary sample rates and channel layouts (mono/stereo) with windowed-sinc filtering.
I had been using ffmpeg for my resampler in my voice apps, but I wanted to try other options. I found using libresample and some of the other options like the WASM one just weren't cutting it so I made my own Pure-js resampler, and I've cut out ffmpeg completely. Sharing here incase anyone else might find it useful!...