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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.