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!
Head to your favorite Discord server and find a voice channel indicated by the small speaker icon. Here's an example from @thesteemengine server: Once you've joined, your username will appear below the voice server in a list of other attendees who are present in the voice server.
Open Discord and send a voice message in any channel you want. Type “/tts” followed by a space, and then type your message. Send the message. The slash command will not appear anymore in your message, but all the users will hear your message aloud in the channel you have sent a message by a voice bot.
In addition to sending audio over voice connections, you can also receive audio (i.e., listen to other users and bots in a voice channel) using discord.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With