revert(voice): back to upstream songbird 0.6.1, nothing was heard with the held-packet patch

With 0.1.32 (songbird vendored with packets of an unnamed SSRC held until
Discord's Speaking op names it) the bot heard nobody on the live server
from its 16:57 join on 2026-11-18, while 0.1.30 heard every request at
15:58 the same day, and the speaker's Discord was heard by everyone else.
The patch is the only receive change between the two, and the cause was
not found (it passed the two-bot test server runs), so it is removed and
the first ~100 ms of a speaker's first utterance after a join is lost
again, as in 0.1.30.

This reverts 81d1e26 and 9199ccb.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
javis-bot
2026-11-18 17:24:58 +09:00
parent a5afdbb221
commit a665dd8d21
123 changed files with 5 additions and 20170 deletions

View File

@@ -135,15 +135,7 @@ and the late "left" update cancelled the new join (seen on real Discord).
- **Hearing**: songbird only decrypts (transport and DAVE). Its own Opus decoding is not used: in
songbird 0.6.1 it decodes the payload without trimming what DAVE decryption left at its end, which
garbled, repeated or dropped about a third of the frames (measured with a test tone that changes
pitch every 20 ms). Discord names a speaker's SSRC (its Speaking op, over the websocket) only the
first time they speak, after their first packets arrive over UDP; songbird dropped the DAVE packets
it could not yet decrypt, which cut the first ~100 ms off the first thing each person said after a
join (live 2026-11-18: "자비스" heard as "아비"). The app therefore uses songbird 0.6.1 with a patch
(`app/vendor/songbird`, `JARVIS-PATCH.md`): packets of an SSRC not named yet are held, at most one
second and 50 packets for each of at most 32 SSRCs, and processed in arrival order once it is named
(before its next packet, or within 20 ms when none follows, as after a short first utterance);
the Speaking event goes out first, so the core knows the speaker before their held packets come.
The core takes each decrypted RTP packet with songbird's exact payload bounds:
pitch every 20 ms). The core takes each decrypted RTP packet with songbird's exact payload bounds:
- Packets go through a per-speaker reorder window in sequence-number order. A missing packet is
waited for until two later packets have arrived (about 40 ms), then rebuilt from the next packet's
Opus in-band FEC (the last missing frame) or concealed (any earlier ones). Late and duplicate