Stuck at connecting
I have noticed that sometimes the connection state of a voice channel goes through these states:
signalling > connecting
connecting > connecting
connecting > connecting
...
Saving an opus stream from a voice channel to .mp3/.wav/.webm
So with the help of another thread here, I managed to save an opus stream to .ogg. Now, I need to save that same opus stream to an .mp3 file instead, and i’m even more stuck than last time.
Can I somehow save the audio to a .mp3 or .wav file instead?
Help would be much mich appreciated…
```js...
How to save a user's voice to a local file? (.mp3 or .ogg)
```js
let listener = voiceReceiver.subscribe(userId, {
end: {
behavior: EndBehaviorType.AfterSilence,
duration: allowedPauseDurationForInputVoice...
Whether to play audio
If I send
!isPlay
, is there a way for the bot to check whether the server is playing audio or not?bzioam fiaoq
Make sure you are using version 0.16.0 of @discordjs/voice or newer.
Check that this also applies to all voice-related packages that may use other versions!npm list discord.js
yarn list discord.js
yarn why discord.js // for yarn v3+...
example.mp3 Audio doesn't play
```js
if (msg.content == '!t') {
const { joinVoiceChannel } = require('@discordjs/voice');
const connection = joinVoiceChannel({...
2nd time joining problem not playing sound
When the user enters for the first time, it does everything i want to do, but when a different user enters for the first time or when the same user enters for the 2nd time, it does not do anything, why?
Error: Cannot play a resource that has already ended.
Hey, i have thsi error when im trying to play a radio flux url like (for example) http://belrtl.ice.infomaniak.ch/belrtl-mp3-192.mp3
This is my code:
```js
const { joinVoiceChannel, createAudioPlayer, createAudioResource, StreamType, entersState } = require("@discordjs/voice");...
Volume normalization
I know this might be a bit of an out-of-scope question, but I couldn't really find any documentation on this online. I found ffmpeg has the option of volume normalization, but it would be nice to not analyze the entire file beforehand.
I have a folder with a bunch of mp3s or oggs and I'm playing then using the example on the website.
The issue is that some are much louder than others....
Message reaction event
Hey, I'm trying to listen for reactions on a message Id but there's no output when I react to the message, could someone please take a look at my code?
events/messageReact.js: https://srcb.in/N4rowidb3P
index.js: https://srcb.in/kAhoNVXfIY...
I have an old alt account of mine but i put a fake email and a random password but i have the token
can someone help me login with it
Audio duplication issue
I am working on a bot that will do, among other things, voice call recording. Something really strange is happening where I'm getting multiple copies of the same audio in different individual output files (I know this because I transcribe and store the individual files as text in a DB using OpenAI). When mixed together, it creates a weird echo effect.
My question is, when subscribing to the "start" event, should I be checking the SpeakingMap to see if something is already registered for a user? Or is there something else I'm doing wrong here? Code is at the link below:
https://github.com/brad95411/breadbot-public/blob/934fa4d37f62af83ee6e988c05156e8fdb7350b3/breadbot.js#L126...
Audio file does not play
Hello, I'm trying to play a sound, but nothing happens when it enters the scope where i call the play, any idea ?
Here is the code : https://pastebin.com/tQGhRGTS
connection is made at line 47
sound is played at line 113...
Send audio from one channel to another one in another guild
Hi, I'm currently making a discord bot about game events utilities, and I had an idea.
Basically I want to create a command to make the bot join a voice channel, and mirror the audio to another voice channel.
Is this possible? And if yes, is there some basic documentation about this sort of thing?...
discord.js and deno
Is the voice library supported with Deno?
I am getting a weird error 'sig is not defined' when trying to run the example code from the docs with Deno.
Thanks for the help!...
forcefully stopping player
hey i just wanted to know if theres a way to forcefully stop playing a resource for example
...
player.play(createAudioResource(audioPath));
player.play(createAudioResource(audioPath));
Problem with play cmd
```if (msg.content.toLowerCase().startsWith(';play')) {
const voiceChannel = msg.member.voice.channel;
if (!voiceChannel) {
return msg.reply('be in vc');...
Voice connection dropping after 3-5 min with ECONNRESET error
Error:
node:events:495
throw er; // Unhandled 'error' event
^
...