#Sending/receiving audio data from a voice channel in Python

1 messages · Page 1 of 1 (latest)

fallow orchid
#

Just a question coming from a Discord.py fork veteran, is Hikari's philosophy to always handle audio with an external piece of software? I'm looking at maybe porting my bot over but my blocker would be that I wrote a ton of custom audio code with asyncio, FFmpeg, and Numpy to do audio processing and sending to Discord, and I can't find anything in the docs that says how to send audio data. I'm also looking at starting to do stuff with receiving audio data (speech to text with Whisper AI, which is going to require Python anyways) so I was hoping that feature would be available here since Discord.py and it's forks don't seem too interested in it.

Is it possible to send/receive audio data in a voice channel in Hikari or is it on the roadmap? Thanks!

blazing glacier
#

First of all, damn. Voice is something not really easy to do, and it's impressive to have done it!

Secondly, hikari doesn't have any built-in voice handler (yet, maybe will be added in the future if a nice API is thought out), but we do have a voice manager that allows you to pass a class and we will do most of the "connection" stuff and forwarding events to that class so you only have to worry about the actual voice part.

#

If you need any help porting stuff or more question, we are here to try and help :)

fallow orchid
#

Ah seems that voice receive isn't documented so I might be on my own for that regardless, that's probably why no one is implementing it.

Well I guess I'll check out the rest of the library for now and see where things go, thank you!

torpid comet
# fallow orchid Ah seems that voice receive isn't documented so I might be on my own for that re...

There is a d.py pull request for that. Maybe it will help https://github.com/Rapptz/discord.py/pull/9288
Also a plugin for d.py for that - https://github.com/Shirataki2/discord-ext-audiorec

GitHub

This PR is based off #6507. I made a new branch and PR for reasons outlined in this comment on my old PR.
Summary

This pull request provides an implementation of receiving and processing audio pac...

GitHub

A discord.py experimental extension for audio recording - GitHub - Shirataki2/discord-ext-audiorec: A discord.py experimental extension for audio recording

#

also damn boi
first pull and such a hard new feature