Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
599 views
in Technique[技术] by (71.8m points)

python 3.x - 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...