Repository navigation
Description
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- Use a remote environment as the voice destination (here over Tailscale), with a local streaming model.
- Start a dictation and speak.
- Cut the client's network for 20–30 s (Wi-Fi off or
tailscale down), then reconnect. - Start a new dictation right away.
Expected behavior
The server notices the dead connection within a few seconds and frees the speech engine, so the next dictation starts.
Actual behavior
The server keeps the dead WebSocket and the single speech slot it holds. Every new dictation is refused within ~1 ms with SpeechBusyError, and the client shows "Live transcription failed. Please try recording again." This lasts until the server finally sees the socket close. Here that took 133 s. The only limit in runSpeechSocket (apps/server/src/speech/stream.ts) is a 10-minute timeout.
GET /api/voice/status reports state: "transcribing" during this time, so the condition is visible but nothing clears it.
The main /ws socket from the same client also stayed open on the server until 19:18:41.9 UTC, so dead connections are not specific to speech. Speech is hit hardest because one stale socket blocks every new dictation.
Related, but not the same problem:
- fix(server): revoked sessions close live dictation streams #39267 closes the speech socket when the session is revoked; it does not detect a dead connection.
- Desktop dictation is discarded when the app loses its connection to the local server #37199 / fix(web): retain desktop dictation during reconnect #39461 are about the client discarding its own recording on reconnect.
- [Bug]: Local dictation loses the whole recording when the GPU fails on one piece #32673 / fix(speech): dictation no longer loses the recording when transcription fails #32674: the client deletes the recording when a stream is refused; this is what made each refusal lose the audio.
Impact
Major degradation or frequent failure
Version or commit
Server 0.1.12-nightly.20261122.5071, desktop 0.1.11-nightly.20261118.4890; stream.ts unchanged on main at 28706ac
Environment
Server: Linux, CPU only, Parakeet Ultra. Client: Manjaro Linux desktop app. Connection: Tailscale (tailscale serve → 127.0.0.1:3773), DERP relay, no direct connection.
Logs or stack traces
# server traces, UTC, 2026-11-22
19:16:38.128 speech.runSocket 133681.7ms Success # the dropped dictation; no client traffic 19:16:38–19:18:21
19:18:31.068 SpeechService.startStream 0.3ms Failure SpeechBusyError
19:18:31.022 speech.runSocket 115ms ERROR "live transcription operation failed"
{ cause: { _tag: 'SpeechBusyError', operation: 'streaming transcription' } }
# … 10 refusals between 19:18:31 and 19:18:48
19:18:51.8 the 19:16:38 socket ends
19:18:59.219 SpeechService.startStream 2.5ms SuccessScreenshots, recordings, or supporting files
No response
Workaround
Wait until the server drops the socket (up to 10 minutes).
Activity