Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot keep up with realtime voice data #25

Open
Vulcanostrol opened this issue Oct 29, 2024 · 1 comment
Open

Cannot keep up with realtime voice data #25

Vulcanostrol opened this issue Oct 29, 2024 · 1 comment

Comments

@Vulcanostrol
Copy link

Thanks to all the contributors of this project for the work you have done on it. I have been enjoying this extension so far.

I have ran into an issue when trying to use audio sinks. Even for the basic example at https://github.com/imayhaveborkedit/discord-ext-voice-recv/blob/main/examples/recv.py, I am running into the issue that AudioSink.write(...) is just not called fast enough for it to keep up with all the data coming in.

In other words, if you have the bot in a voice channel, and have it record to a basic AudioSink (Let's say an FFMPEG sink), it will only have written 45-50 minutes of audio to the file when the hour is up.

When I use a very barebones AudioSink, that purely does a print when its write(...) method is called, it is still unable to keep up with the data coming in. I have debugged that the AudioReader.callback(...) method would be called fast enough, given that I replace all code within it with a print statement.

This means that (I think) there is some major inefficiency in this extension. Could it be the locks that you are using? If you are aware of any issues with this, could you point me in the right direction on how to fix it so I could maybe work on a PR?

Thanks again for your work.

@Vulcanostrol
Copy link
Author

Oh, maybe handy to say here that I am on an Apple Sillicon device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant