Skip to content

[Bug]: A dropped dictation connection keeps the speech engine busy for up to 10 minutes #41069

Closed

Description

@TheSalaty

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

  1. Use a remote environment as the voice destination (here over Tailscale), with a local streaming model.
  2. Start a dictation and speak.
  3. Cut the client's network for 20–30 s (Wi-Fi off or tailscale down), then reconnect.
  4. 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:

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 Success

Screenshots, recordings, or supporting files

No response

Workaround

Wait until the server drops the socket (up to 10 minutes).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions