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

"discord.ext.voice_recv.opus: x packets were lost being flushed in decoder" causing wav file to be output incorrectly #5

Open
CattoYT opened this issue Feb 11, 2024 · 7 comments

Comments

@CattoYT
Copy link

CattoYT commented Feb 11, 2024

When packets are flushed, the output wav file seems to speed up and skip audio sections
Example files: https://drive.google.com/drive/folders/13TclkKZRA6_9nm_jJvg3-T3WSgENQeKJ?usp=drive_link

This also seems to happen with WaveSinks, so I'm not quite sure that its my code acting up.

What I'm currently doing is writing all of the received VoiceData to a bytes() and then using Wave_write.writeframes to create a wav file with the bytes.

Is this intended behavior, and if so, is there a way around it?

@imayhaveborkedit
Copy link
Owner

I still haven't fully hammered out how the packet flushing/teardown semantics are going to be. Since there's no equivalent function on the dpy voice send side of things I have to figure out if/how I want to expose it. There's a bit more design and testing to do on my end but at this point no, problems are not "intended", but for this issue in particular I don't think I have anything for you just yet.

@CattoYT
Copy link
Author

CattoYT commented Feb 11, 2024

no problem, I understand that this is probably a lot more complicated than what appears, so please take your time!

@realcoloride
Copy link

Hey there.. any update?

@imayhaveborkedit
Copy link
Owner

I've figured out what's causing this. The sequence rollover handling logic is a bit buggy causing it to erroneously drop packets. This will be fixed in due time.

@realcoloride
Copy link

About time haha! Good luck

@CattoYT
Copy link
Author

CattoYT commented Sep 26, 2024

Apologies for the necropost, but are there any updates on this yet?

@imayhaveborkedit
Copy link
Owner

Unfortunately not yet. I've been fairly busy lately and in the middle of working through the issues in this I ended up putting this aside for some time. At the moment im still a bit busy but I'll try to see if I can sort this issue out quickly or if I need to put more work into it.

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

3 participants