Search code examples
python-3.xaudioartificial-intelligencespeech-recognitiondiscord.py

Discord receive audio


I want to receive Audio from Discord to make a speech recognition. I haven't found something in the python Discord APi. The speech recognition is no problem, but I have no idea how to receive Audio from Discord. Maybe someone can help me.


Solution

  • This functionality doesn't really exist. There is a VoiceClient.poll_voice_ws coroutine, but that just reads directly from the socket. You'll have to come up with some way of decoding that into audio and further handling it yourself.