{"record":{"id":"c0a2faddb5c245ee","repo":"SubtitleEdit/subtitleedit","slug":"crispasr-cosyvoice3-tts-did-not-report-healthy-w","errorCode":null,"errorMessage":"crispasr (cosyvoice3-tts) did not report healthy within {(allLocal ? 5 : 30)} minutes. Last output: {lastOutput}{LaunchCmdSuffix}","messagePattern":"crispasr \\(cosyvoice3-tts\\) did not report healthy within (.+?) minutes\\. Last output: (.+?)(.+?)","errorType":"exception","errorClass":"TimeoutException","httpStatus":null,"severity":"error","filePath":"src/ui/Features/Video/TextToSpeech/Engines/CosyVoice3CrispAsr.cs","lineNumber":804,"sourceCode":"                    _serverLaunchCommand = null;\n                    _serverModelKey = null;\n                    _serverVoiceArg = null;\n                    _serverRefText = null;\n                    throw new InvalidOperationException(\n                        $\"crispasr (cosyvoice3-tts) 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 (cosyvoice3-tts) did not report healthy within {(allLocal ? 5 : 30)} minutes. Last output: {lastOutput}\"\n                + LaunchCmdSuffix(timeoutLaunchCommand));\n        }\n        finally\n        {\n            ServerLock.Release();\n        }\n    }\n\n    private static string SnapshotServerLog()\n    {\n        lock (_serverLog)\n        {\n            var s = _serverLog.ToString().TrimEnd();\n            return s.Length > 2000 ? s[^2000..] : s;\n        }\n    }\n","sourceCodeStart":786,"sourceCodeEnd":822,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Features/Video/TextToSpeech/Engines/CosyVoice3CrispAsr.cs#L786-L822","documentation":"TimeoutException from CosyVoice3CrispAsr.EnsureServerRunningAsync: the deadline (5 minutes when all model files are local, 30 minutes when --auto-download must fetch the ~921 MB–2.5 GB bundle) elapsed without a successful /health probe and without the process exiting. StopServerInternal is called before throwing.","triggerScenarios":"Startup loop runs until DateTime.UtcNow >= deadline while ProbeHealthAsync keeps returning false and process.HasExited stays false; the server is alive but never reports healthy.","commonSituations":"First run with --auto-download on a slow/throttled connection (30 min insufficient); the server bound to the port but /health is hung during warm-up; very slow CPU/GPU warm-up exceeding the local 5-minute window; CDN/proxy blocking the silent companion fetch behind -m auto.","solutions":["Re-run — the partial download is cached and resumes, so the second attempt is shorter.","Ensure network/proxy/antivirus allows the CrispASR model CDN so the silent fetch is not throttled.","Pre-stage all model files locally so the 5-minute local deadline applies.","On slow hardware, allow more time or move to a GPU host for faster warm-up.","Inspect 'Last output' — a stall line indicates a download/network problem."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Pre-stage model files locally so the 5-min (not 30-min) deadline applies.\nif (!CosyVoice3CrispAsr.AreModelsInstalled(modelKey))\n    await DownloadCosyVoice3BundleAsync(modelKey, ct); // out-of-band pre-stage","typeGuard":null,"tryCatchPattern":"try { await cosyVoice3Engine.Speak(text, out, voice, lang, region, model, ct); }\ncatch (TimeoutException ex) when (ex.Message.Contains(\"did not report healthy\", StringComparison.Ordinal))\n{\n    Se.WriteToolsLog(\"CosyVoice3 startup timed out (likely download); retrying after cache.\", true);\n    await cosyVoice3Engine.Speak(text, out, voice, lang, region, model, ct);\n}","preventionTips":["Pre-stage the CosyVoice3 bundle so the local 5-min deadline applies.","Whitelist the model CDN in proxy/AV so the silent fetch is not throttled.","On slow hardware/GPU warm-up, allow more time or move to a faster host."],"tags":["tts","cosyvoice3","crispasr","timeout","download","startup","warm-up"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}