{"record":{"id":"1406129b2c2f6a12","repo":"SubtitleEdit/subtitleedit","slug":"chatterbox-tts-request-failed-the-connection-to","errorCode":null,"errorMessage":"Chatterbox TTS request failed — the connection to the crispasr server was dropped.","messagePattern":"Chatterbox TTS request failed — the connection to the crispasr server was dropped\\.","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/ui/Features/Video/TextToSpeech/Engines/ChatterboxTtsCpp.cs","lineNumber":406,"sourceCode":"            if (died)\n            {\n                StopServerInternal();\n            }\n            var failMsg = $\"Chatterbox TTS request failed - Voice: {chatterboxVoice}, Text: {text}, \"\n                + $\"RequestJson: {body}, ServerExited: {died}, ServerLog: {serverLog}\"\n                + LaunchCmdSuffix(launchCommand);\n            Se.LogError(ex, failMsg);\n            Se.WriteToolsLog(failMsg);\n\n            var prefix = LooksLikeUpstreamChatterboxCrash(serverLog)\n                ? \"Chatterbox TTS hit a CrispASR runtime bug during synthesis (ggml tensor read out of bounds). \"\n                  + \"This is an upstream issue — please file it at https://github.com/CrispStrobe/CrispASR/issues with the server log below. \"\n                  + \"The crash reproduces on the CPU and Vulkan builds (chatterbox's T3 step runs on CPU regardless of the build); \"\n                  + \"the CUDA build may avoid it but is unverified.\"\n                : \"Chatterbox TTS request failed — \"\n                  + (died ? \"the crispasr server crashed during synthesis.\" : \"the connection to the crispasr server was dropped.\");\n\n            throw new InvalidOperationException(\n                prefix\n                    + (string.IsNullOrEmpty(serverLog) ? string.Empty : $\"{Environment.NewLine}Server log:{Environment.NewLine}{serverLog}\")\n                    + LaunchCmdSuffix(launchCommand),\n                ex);\n        }\n\n        using (response)\n        {\n            if (!response.IsSuccessStatusCode)\n            {\n                var errorBody = await SafeReadErrorAsync(response, cancellationToken);\n                var serverLog = SnapshotServerLog();\n                var launchCommand = _serverLaunchCommand;\n                var errMsg = $\"Chatterbox TTS server error {(int)response.StatusCode} {response.StatusCode} - \"\n                    + $\"Voice: {chatterboxVoice}, Text: {text}, RequestJson: {body}, \"\n                    + $\"ResponseBody: {errorBody}, ServerLog: {serverLog}\"\n                    + LaunchCmdSuffix(launchCommand);\n                Se.LogError(errMsg);","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Features/Video/TextToSpeech/Engines/ChatterboxTtsCpp.cs#L388-L424","documentation":"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.","triggerScenarios":"HttpClient.SendAsync throws/aborts while the server process is still running; `died` false, LooksLikeUpstreamChatterboxCrash false.","commonSituations":"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.","solutions":["Verify the server is reachable (curl POST to /v1/audio/speech).","Check for any proxy/load-balancer between client and server and raise its timeout.","Retry — the server should still be up and accept a new request.","If server is remote, move it to loopback or fix the network path."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { await chatterbox.Speak(...); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"connection to the crispasr server was dropped\"))\n{ /* server still alive; retry the request once */ }","preventionTips":["Run the crispasr server on loopback when possible to avoid network drops.","Raise any intermediate proxy idle timeout above synthesis duration.","Retry on connection drop only when the server process is confirmed alive."],"tags":["chatterbox","crispasr","connection-drop","network","text-to-speech"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}