SubtitleEdit/subtitleedit · error · InvalidOperationException

Chatterbox TTS request failed — the connection to the crispa

Error message

Chatterbox TTS request failed — the connection to the crispasr server was dropped.

What it means

Same throw site but `died` is false — the HTTP connection to the crispasr server was dropped without the server process visibly exiting. Distinct from 191: the server is (probably) still alive, the link went away.

Source

Thrown at src/ui/Features/Video/TextToSpeech/Engines/ChatterboxTtsCpp.cs:406

            if (died)
            {
                StopServerInternal();
            }
            var failMsg = $"Chatterbox TTS request failed - Voice: {chatterboxVoice}, Text: {text}, "
                + $"RequestJson: {body}, ServerExited: {died}, ServerLog: {serverLog}"
                + LaunchCmdSuffix(launchCommand);
            Se.LogError(ex, failMsg);
            Se.WriteToolsLog(failMsg);

            var prefix = LooksLikeUpstreamChatterboxCrash(serverLog)
                ? "Chatterbox TTS hit a CrispASR runtime bug during synthesis (ggml tensor read out of bounds). "
                  + "This is an upstream issue — please file it at https://github.com/CrispStrobe/CrispASR/issues with the server log below. "
                  + "The crash reproduces on the CPU and Vulkan builds (chatterbox's T3 step runs on CPU regardless of the build); "
                  + "the CUDA build may avoid it but is unverified."
                : "Chatterbox TTS request failed — "
                  + (died ? "the crispasr server crashed during synthesis." : "the connection to the crispasr server was dropped.");

            throw new InvalidOperationException(
                prefix
                    + (string.IsNullOrEmpty(serverLog) ? string.Empty : $"{Environment.NewLine}Server log:{Environment.NewLine}{serverLog}")
                    + LaunchCmdSuffix(launchCommand),
                ex);
        }

        using (response)
        {
            if (!response.IsSuccessStatusCode)
            {
                var errorBody = await SafeReadErrorAsync(response, cancellationToken);
                var serverLog = SnapshotServerLog();
                var launchCommand = _serverLaunchCommand;
                var errMsg = $"Chatterbox TTS server error {(int)response.StatusCode} {response.StatusCode} - "
                    + $"Voice: {chatterboxVoice}, Text: {text}, RequestJson: {body}, "
                    + $"ResponseBody: {errorBody}, ServerLog: {serverLog}"
                    + LaunchCmdSuffix(launchCommand);
                Se.LogError(errMsg);

View on GitHub (pinned to 17a9f07487)

Solutions

  1. Verify the server is reachable (curl POST to /v1/audio/speech).
  2. Check for any proxy/load-balancer between client and server and raise its timeout.
  3. Retry — the server should still be up and accept a new request.
  4. If server is remote, move it to loopback or fix the network path.
Defensive patterns

Strategy: retry

Try / catch

try { await chatterbox.Speak(...); }
catch (InvalidOperationException ex) when (ex.Message.Contains("connection to the crispasr server was dropped"))
{ /* server still alive; retry the request once */ }

Prevention

When it happens

Trigger: HttpClient.SendAsync throws/aborts while the server process is still running; `died` false, LooksLikeUpstreamChatterboxCrash false.

Common situations: Server on another machine with a network blip; intermediate proxy/reverse-proxy with a short idle timeout; firewall resetting the loopback/lan connection; OS TCP reset.

Related errors


AI-assisted analysis of SubtitleEdit/subtitleedit@17a9f07487 (2026-08-13). Data as JSON: /api/errors/1406129b2c2f6a12. Report an issue: GitHub.