{"record":{"id":"c2962ee34c074cf3","repo":"SubtitleEdit/subtitleedit","slug":"crispasr-indextts-exited-during-startup-code-e","errorCode":null,"errorMessage":"crispasr (indextts) exited during startup (code {exitCode}). Output: {tail}{LaunchCmdSuffix}","messagePattern":"crispasr \\(indextts\\) exited during startup \\(code (.+?)\\)\\. Output: (.+?)(.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"src/ui/Features/Video/TextToSpeech/Engines/IndexTtsCrispAsr.cs","lineNumber":617,"sourceCode":"            HookProcessExitOnce();\n\n            // First-run auto-download (~870 MB total) needs a generous timeout, but much\n            // shorter than VibeVoice/Qwen3 thanks to the smaller model.\n            var deadline = DateTime.UtcNow.AddMinutes(hasLocalTalker && hasLocalCodec ? 5 : 15);\n            while (DateTime.UtcNow < deadline)\n            {\n                ct.ThrowIfCancellationRequested();\n                if (process.HasExited)\n                {\n                    var tail = SnapshotServerLog();\n                    var exitCode = process.ExitCode;\n                    var exitedLaunchCommand = _serverLaunchCommand;\n                    _serverProcess = null;\n                    _serverPort = 0;\n                    _serverLaunchCommand = null;\n                    _serverVoicePath = null;\n                    _serverModelKey = null;\n                    throw new InvalidOperationException(\n                        $\"crispasr (indextts) exited during startup (code {exitCode}). Output: {tail}\"\n                        + LaunchCmdSuffix(exitedLaunchCommand));\n                }\n                if (await ProbeHealthAsync(port, TimeSpan.FromSeconds(2), ct))\n                {\n                    return;\n                }\n                await Task.Delay(TimeSpan.FromSeconds(1), ct);\n            }\n\n            var lastOutput = SnapshotServerLog();\n            var timeoutLaunchCommand = _serverLaunchCommand;\n            StopServerInternal();\n            throw new TimeoutException(\n                $\"crispasr (indextts) did not report healthy within {(hasLocalTalker && hasLocalCodec ? 5 : 15)} minutes. Last output: {lastOutput}\"\n                + LaunchCmdSuffix(timeoutLaunchCommand));\n        }\n        finally","sourceCodeStart":599,"sourceCodeEnd":635,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Features/Video/TextToSpeech/Engines/IndexTtsCrispAsr.cs#L599-L635","documentation":"InvalidOperationException from IndexTtsCrispAsr.EnsureServerRunningAsync when the indextts crispasr server process exits before the first successful health probe. Mirrors the F5-TTS equivalent: the exit code, last 2000 chars of server log, and the launch command are attached. Server state fields (_serverProcess/_serverPort/_serverVoicePath/_serverModelKey) are cleared so the next call restarts cleanly.","triggerScenarios":"Missing or corrupt talker/codec GGUF and `--auto-download` fails; the `--voice` reference WAV is unreadable so the indextts backend aborts at init; CUDA/runtime error at boot; the path-traversal `--voice` arg contains characters the backend rejects at startup; AV killing the process.","commonSituations":"Reference WAV deleted/moved after the voice was selected (path baked into `--voice` no longer valid); interrupted first-run ~870 MB model download; CrispASR CLI flag change between versions; GPU driver incompatibility.","solutions":["Read the `Output:` tail — the indextts backend prints its abort reason there.","Run the `Launch command:` line in a terminal for the full error.","Confirm the reference WAV at the `--voice` path still exists and is readable.","Verify both talker and codec GGUFs (or let `--auto-download` re-fetch on a stable link).","Add the CrispASR folder to AV exclusions."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Pre-flight checks before first synth\nif (!File.Exists(engine.GetCrispAsrExecutable())) { PromptInstallCrispAsr(); return; }\nif (!File.Exists(indexVoice.FilePath)) { WarnUser(\"Reference WAV missing\"); return; }","typeGuard":null,"tryCatchPattern":"try { await indexEngine.Speak(...); }\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"exited during startup\"))\n{\n    ShowDiagnostics(ex.Message); // exit code + Output tail + launch command\n}","preventionTips":["Pre-stage talker + codec GGUFs to avoid auto-download failures at boot.","Verify the `--voice` reference WAV still exists before each job.","Add CrispASR to AV exclusions.","Match the CrispASR version to the CLI flags the code emits."],"tags":["indextts","crispasr","process-startup","server","tts"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}