fix(app): moving to another voice channel no longer ends the new session
- Same-server moves point the existing songbird connection at the new channel and replace its handlers; removing and rejoining at once let the late gateway "left" update cancel the new join. - A driver disconnect without a reason (our own leave or move) is ignored, and a disconnect only ends the session its handler belongs to, so an old connection's late event cannot end a newer one. - Live test: move to a second voice channel and back; the session survives both, only the two moves end one, and the speaker is still heard afterwards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -93,7 +93,10 @@ did not open is ignored.
|
||||
|
||||
## Voice
|
||||
|
||||
One voice session at a time, in the configured server. Joining another channel leaves the current one.
|
||||
One voice session at a time, in the configured server. Joining another channel ends the current
|
||||
session (`Left` with `moved`). Within the same server the existing songbird connection is pointed at
|
||||
the new channel and its event handlers are replaced: leaving and joining at once races the gateway,
|
||||
and the late "left" update cancelled the new join (seen on real Discord).
|
||||
|
||||
- **Join** (slash command `join`, auto-join, or `join(channel_id)`): connect through songbird with DAVE
|
||||
end-to-end encryption, not deafened, then post `voice.joinNotice` in the voice channel's chat. A
|
||||
@@ -129,7 +132,9 @@ One voice session at a time, in the configured server. Joining another channel l
|
||||
`cancelled: true`. Stopping by voice ("자비스, 멈춰") needs call detection and comes in M4.
|
||||
- **Leave** (slash command `leave`, or `leave()`): stop speaking, send `speaker_leave` for everyone
|
||||
heard, and disconnect. When songbird's driver gives up the connection (kicked, channel deleted, long
|
||||
network loss) the session ends with `disconnected`. When someone moves the bot to another channel,
|
||||
network loss) the session ends with `disconnected`. A driver disconnect without a reason is one the
|
||||
core asked for (leave or move) and is ignored, and a disconnect only ends the session its handler
|
||||
was attached to, so an old connection's late event never ends a newer session. When someone moves the bot to another channel,
|
||||
the session follows it.
|
||||
|
||||
## Slash command
|
||||
@@ -170,8 +175,10 @@ registered until it is removed (M5 setup).
|
||||
voice channel with the real worker on the GPU. It refuses to run if a person is in the channel or
|
||||
either bot is already in a voice channel, and cleans up even when a step fails. It checks command
|
||||
registration, transcription of recorded sentences played into the channel, speech the other bot
|
||||
hears and the STT reads back, stop, chat events, history, sending without pings, the speaker
|
||||
leaving and coming back three times (each a DAVE group change), and leaving.
|
||||
hears and the STT reads back, stop, chat events, history, sending without pings, moving to a second
|
||||
voice channel and back (the session survives each move and only the two moves end one), the speaker
|
||||
leaving and coming back three times (each a DAVE group change), and leaving. It needs a second voice
|
||||
channel of the server (`JARVIS_LIVE_VOICE_CHANNEL_2`) and refuses if a person is in either.
|
||||
Measured on this server's RTX 5050 (2026-11-11): five sentences all heard (character error rate 0%
|
||||
for three, 5% and 12.5% for two), 0.71-0.90 s from the end of speech to the final, Jarvis's speech
|
||||
read back at 3.4-6.9%, sound gone 0.03-0.08 s after stop, and the sentence heard exactly after each
|
||||
|
||||
Reference in New Issue
Block a user