GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — DSharpPlus.Voice by akiraveliara · Pull Request #2404 · DSharpPlus/DSharpPlus

Conversation

@akiraveliara

@akiraveliara akiraveliara commented Dec 19, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

the initial pull request for DSharpPlus.Voice.

closes #768
closes #1269
closes #2385

todo:

  • receive
  • audio packet queuing for sending
  • reconnecting/resuming
  • rewire encoding to take advantage of opus' 24-bit and float support instead of (not very costly, but absolutely unreadable) normalization to 16-bit
  • user interface for sending/receiving audio
  • use a more sophisticated mechanism for audio enqueuing than Channel
  • reduce memory management overhead
  • handle RTCP packets
  • correctly track and send RTCP information
  • docs
  • metrics
  • handle channel moves
  • allow ingesting ogg/opus files directly. this would probably be good to have in the initial PR so that users updating immediately get the most efficient behaviour for ogg/opus files

open questions:

  • is it relevant that if we don't receive a user's SSRC in time, we can't decrypt their audio? do we have to buffer those frames?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Plerx2493 reacted with thumbs up emoji kcrg, BloodyBaRGaIn, and Ted-Jin-Lab reacted with heart emoji t1stm, dandln, and RXDCODX reacted with eyes emoji
All reactions
  • 👍 1 reaction
  • ❤️ 3 reactions
  • 👀 3 reactions
akiraveliara and others added 30 commits June 6, 2025 18:43
@akiraveliara
start by obsoleting VoiceNext
96a8a62
@akiraveliara
Squashed 'lib/libaerith/inc/dave/' content from commit 6e5ffbc1
46ea60c
git-subtree-dir: lib/libaerith/inc/dave
git-subtree-split: 6e5ffbc1cb4eef6be96e8115c4626be598b7e501
@akiraveliara
Merge commit '46ea60c33670437abd5c972d66d37ac7ff15fe5b' as 'lib/libae…
89c22cb
…rith/inc/dave'
@akiraveliara
merge master
ec541bb
@akiraveliara
remove the vnext project from the solution
154574c
@akiraveliara
push preliminary session binding code
f714bd9
still missing some methods, but
@akiraveliara
add Session::ProcessProposals
1f73350
@akiraveliara
add Session::GetMarshalledKeyPackage
4c76392
@akiraveliara
wrap RosterMap and add bindings to c# for the remaining methods
1827887
@akiraveliara
wrap the c++ into (relatively) usable c#
69d40af
also makes the c++ nicer to interface with
and also fully delete vnext, not sure why it was still there
@akiraveliara
nulls mean "nothing of note happened" in this case
7fd252f
@akiraveliara
remove the in-tree native in favour of dsharpplus/libkoana
d71296f
@akiraveliara
retarget the MLS interop
8af34b1
@akiraveliara
avoid the mistakes of our ancestors
1319b85
voicenext used the sodium status code as a length lmao
@akiraveliara
implement the sodium cryptors
f50b973
@akiraveliara
add opus interop bindings
3920c3b
@akiraveliara
Merge remote-tracking branch 'origin/master' into voice-rewrite
5f7ddac
@akiraveliara
implement the opus binding layer
6546f99
@akiraveliara
rewrite the self-building guide
08cf10b
@akiraveliara
add audio buffer pooling capability
0c9719c
@akiraveliara
implement opus encoders and decoders
247d435
@RoniRaad
added media transport service
c617e67
@RoniRaad
updated memory type for writing to media transport service.
68b541f
@RoniRaad
Added xmldocs
c6916aa
@akiraveliara
Merge pull request #2363 from RoniRaad/voice-rewrite-features/media-t…
bbbc1d1
…ransport

added media transport service
@akiraveliara
add an e2ee session wrapper, move the udp transport code, throw out v…
96349c1
…4-era networking plumbing
@RoniRaad
Initial commit for transport service.
b36df43
@RoniRaad
Fixed naming convention and binary opCode parsing for DiscordTranspor…
5bc3555
…tService. Changed TransportService to use ArrayPoolBufferWriter instead of MemoryStream.
@RoniRaad
Discord Transport Service cleanup.
5c8a990
@akiraveliara
Merge pull request #2364 from RoniRaad/voice-rewrite-features/transpo…
50ae74f
…rt-service

Initial commit for transport service.
akiraveliara added 14 commits May 22, 2026 15:10
@akiraveliara
fix opus repacketizer crashing when using AudioType.Music
1ee84d3
@akiraveliara
rip out infrastructure for 120ms packets, discord only supports 20ms
8876fc3
@akiraveliara
rip out repacketizer interop too
8a9f569
@akiraveliara
rip the repacketizer out of the encoder as well
c9cadee
@akiraveliara
handle being moved between channels
08eaf67
@akiraveliara
line-wise staging, my nemesis
2ea34d4
@akiraveliara
document bitrate limitations and don't kill the main gateway when dis…
19254d8
…connecting
@akiraveliara
add a catchup loop to sending audio if we're delayed
ba9e585
@akiraveliara
remove erroneous debug code
d45ac8a
@akiraveliara
track when we've caught back up to realtime
84ae4fc
@akiraveliara
fix silence detection never recovering if audio is streamed in realtime
2abfbac
@akiraveliara
make the audio sending loop more resistant to jittering
04e656c
@akiraveliara
remove a stray debug instruction
69037ea
@akiraveliara
improve codegen for widening mono to stereo
ef648de
@akiraveliara
akiraveliara marked this pull request as ready for review June 6, 2026 10:51
akiraveliara added 5 commits August 20, 2026 21:26
@akiraveliara
Merge remote-tracking branch 'origin/master' into voice-rewrite
0d54f55
@akiraveliara
properly fix the merge conflicts
c0606bc
@akiraveliara
implement #1269
c538697
@akiraveliara
add a convenience method to seamlessly reconnect
4298b27
@akiraveliara
use the corelib websocket abstraction in voice
ab818db
Plerx2493
Plerx2493 reviewed Sep 10, 2026
View reviewed changes

@Plerx2493 Plerx2493 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think i understood everything i read but i read it all

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread DSharpPlus.Voice/ConnectingExtensions.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/articles/voice/introduction.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/articles/voice/introduction.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread docs/articles/voice/introduction.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/AudioWriters/Ogg/OggOpusReader.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/AudioTimestamp.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/AudioTimestamp.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/RegistrationExtensions.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/VoiceConnection.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/VoiceConnection.Audio.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@akiraveliara
address PR feedback, anonymize IPs, fix opus cover art
94fb322
@akiraveliara
akiraveliara requested a review from Plerx2493 September 10, 2026 15:06
@akiraveliara
fix the calculation of AudioTimestamp.Milliseconds
c535943
Plerx2493
Plerx2493 approved these changes Sep 10, 2026
View reviewed changes

@Plerx2493 Plerx2493 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Naamloos
Naamloos approved these changes Sep 10, 2026
View reviewed changes

@Naamloos Naamloos left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Knowing you, I trust you tested this properly.

I do wonder if you tested it both on a Unix-based machine and a Windows-based machine as a lot of native calls are done. If needed, I can test it for you on either Windows or Linux if needed.

Most of my comments can (probably) be discarded, but I did ask some questions about clarification of e.g. magic numbers and a variable that was vague to me.

Other than that, I don't see anything alarming or bad so I'll approve the PR. If you feel like none of my comments are to be addressed, I trust you to make the right decision 👍🏼

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread DSharpPlus.Voice/AudioWriters/OggOpusAudioWriter.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/Codec/OpusDecoder.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/Cryptors/AeadXChaCha20Poly1305Cryptor.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/MemoryServices/Collections/SynchronizedList.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/Protocol/RTP/RTPTimestamp.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/Transport/MediaTransportService.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/AbstractPcmAudioWriter.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/AbstractPcmAudioWriter.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/VoiceConnection.Audio.Sending.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread DSharpPlus.Voice/VoiceConnection.VGW.cs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@akiraveliara
clarify variable naming in media transport
d1a6bd5
@akiraveliara
akiraveliara merged commit 0d2d90e into master Sep 10, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@akiraveliara
akiraveliara deleted the voice-rewrite branch September 10, 2026 20:15
@akiraveliara akiraveliara mentioned this pull request Sep 11, 2026
v5 breaking changes tracking issue #1585
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Naamloos Naamloos Naamloos approved these changes
@Plerx2493 Plerx2493 Plerx2493 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

big-change enhancement new-features obsolete: voicenext voice

Projects

None yet

Milestone

v5.0

Development

Successfully merging this pull request may close these issues.

No audio output from the bot connecting to any voice channel should allow you to move between voice channels seamlessly Add ability to send opus data through with Voice

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@akiraveliara @Naamloos @Plerx2493 @RoniRaad
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.