Can I make a discord python bot recognize when a person in a voice channel talks?

Viewed 1327

I am currently creating a Discord Python bot and I would like the bot to be able to recognize when people in a voice channel are speaking. The bot does not have to be able to recognize speech.

For example, if a member speaks, I want the bot to do an action, such as play audio.

Let me know if you could help or have done something similar. Also, if anyone knows anything about recognizing speech or monitoring the loudness of someone's audio, let me know!

1 Answers

Discord.py does not support voice yet, You can use Discord.js for now. I ran into the same problem and had to move to @discordjs/opus or opusscript both have voice support...

EDIT

You can either follow my path (changing the whole language and library) OR Use this:

what I found discord.py[VOICE] which uses PyNaCl (for voice support)

python3 -m pip install -U discord.py[voice]

To install the version that supports voice uses PyNaCl as extra package than discord.py for more details and more documentation about this please check this

Related