I want to make a bot that plays audios depending on the amount of decibels people are making on the call, any idea if it's possible or how to do this with discord.js?
I have tried this in the past.
None of my solutions worked after tens of hours of research and testing, but it might work for you if you have more time/knowledge. Here's what I tried if you want a starting point:
Decoding the audio bitstream into raw pcm, and reading the buffer to find the amplitude (little-endian vs big-endian is important).
Piping the stream into ffmpeg and using a filter like ebur128 to get the audio level (using encoded and decoded audio, when I tried this, it was able to distinguish between whispering and talking, but not talking and yelling).
Good luck if you choose to pursue this.