Conversation
this doesn't matter as both of the only cipher modes doesn't have any prefixes, but still
This is currently a PR over at serenity-rs/songbird#291, but I'd like to cut an alpha release to battle test this on my bots. Also upgrade PyO3 to 0.28.2, and maturin to 1.12 for the namespace package support.
|
I'm not sure how I can surface the voice privacy code up to the |
This is due to a race condition between buffered gateway events (all events except Hello, Ready, Resumed before SessionDescription are buffered) and newly incoming gateway events. Due to tokio::select! [polling branches in random order](https://docs.rs/tokio/latest/tokio/macro.select.html#fairness), DaveMlsProposals can be processed before ClientsConnect, which is where the list of connected users are sent. Ensuring that all buffered events are processed first allows for the list of recognized user IDs to be properly populated.
Discord enforced DAVE (E2EE) protocol for all voice connections starting
March 2, 2026. The voice gateway now rejects non-DAVE clients with close
code 4017 ("E2EE/DAVE protocol required").
Switch songbird dependency from crates.io v0.5.0 to beerpsi-forks/songbird
(davey branch) which implements DAVE protocol support via the `davey` crate
and MLS-based key exchange. This fork is from PR serenity-rs/songbird#291.
Ref: serenity-rs/songbird#291
https://claude.ai/code/session_01K2oMKKW55q1PFaipJhmwK8
|
Thanks for the great work on this! I was able to get my library working by pointing to your fork in the meantime. I may not be in a position to contribute much directly, but please let me know if there’s anything I can do to help move this forward! |
|
Works for me! 😃 |
Can be moved back to a normal dependency once serenity-rs/songbird#291 is in a published release
Discord now needs DAVE/E2EE for voice connection, PR in origin songbird upstream hasn't been merged, so swtich to beerpsi's fork to fix this Refs: serenity-rs/songbird#291
This comment was marked as off-topic.
This comment was marked as off-topic.
…ted before proceeding
There was a problem hiding this comment.
The changes looks good, I have the comment about the unnecessary (as far as I can tell) atomic (I was wrong there) and then there is some warning of unused values you get when you for example build the twilight example that needs to be cleaned up, but other than that it looks good.
|
Tested, works great for me, no issues, tested with following override for others in need |
|
Thanks for this guys. Tested and works great! Looking forward to the merge. |
|
Ran in to trouble with DAVE protocol on my sound bot. I've added this as a songbird patch and tested it. It works great! 🙌 |
* Discord E2EE/DAVE Discord is now enforcing DAVE (Discord Audio Video Encryption) for voice now. There is a [PR](serenity-rs/songbird#291) to support the protocol. The changes here will add that PR as a temporary patch. * Sqlite types fix Updates to rusqlite no longer support u64 types. This changes the types to i64 now.
* Discord E2EE/DAVE Discord is now enforcing DAVE (Discord Audio Video Encryption) for voice now. There is a [PR](serenity-rs/songbird#291) to support the protocol. The changes here will add that PR as a temporary patch. * Sqlite types fix Updates to rusqlite no longer support u64 types. This changes the types to i64 now. Co-authored-by: krywicki <joseph.krywicki@gmail.com>
Closes #293
Sending voice packets now mostly works.
Receiving is not very heavily tested, and there are a bunch of annoyances:
Passthrough (unencrypted) voice packets will still go into the decryption code path, so you will get error logs like:The UDP receiving task is separate from the gateway task, so decrypting the first few packets will fail because the key ratchets haven't been set up yet. This should probably be fixed with a buffer?Packets that are received before the key ratchets are set up are silently dropped.SpeakingStateUpdateevents are apparently not fired consistentlyThe PR is still unreviewed, butif your bot needs this it's been tested and working on a few bots. If you useserenity-next, you may want to depend on jtscuba's fork of this PR instead, which depends onserenity-next: https://github.com/jtscuba/songbird/tree/daveyTODO
serenity-voice-modelwill need to be updated on crates.io to add the missingdave_protocol_versionfield inSessionDescription.Call::voice_privacy_code?)