SubtitleEdit/subtitleedit · error · InvalidOperationException

crispasr (chatterbox) exited during startup (code {exitCode}

Error message

crispasr (chatterbox) exited during startup (code {exitCode}). Output: {tail}{LaunchCmdSuffix}

What it means

The generic fallback in ChatterboxTtsCpp's startup loop: crispasr exited before the /health probe ever succeeded, and none of the specific signature matchers (outdated ASR, stale cache, turbo tokenizer mismatch, turbo startup crash) recognised the output. It surfaces the raw exit code and the last 2000 chars of server output so the failure can be diagnosed.

Source

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

                            + "is fine — 0.8.0's tokenizer/vocab check was overly strict and rejected its "
                            + "benign embedding superset (50257-token tokenizer, text vocab size 50276). "
                            + "This is fixed upstream (CrispStrobe/CrispASR#181): a newer CrispASR loads "
                            + "Turbo normally, with no re-download. Until then, switch to the \"Base\" "
                            + "Chatterbox model, which works."
                            + Environment.NewLine + Environment.NewLine + tail
                            + LaunchCmdSuffix(exitedLaunchCommand));
                    }
                    if (LooksLikeChatterboxTurboStartupCrash(modelKey, tail))
                    {
                        throw new InvalidOperationException(
                            "Chatterbox TTS \"Turbo\" model crashed CrispASR during startup. This is a known "
                            + "upstream issue in the chatterbox-turbo backend (especially on macOS/CPU). "
                            + "Try the \"Base\" model instead, or file an issue at "
                            + "https://github.com/CrispStrobe/CrispASR/issues with the log below."
                            + Environment.NewLine + Environment.NewLine + tail
                            + LaunchCmdSuffix(exitedLaunchCommand));
                    }
                    throw new InvalidOperationException(
                        $"crispasr (chatterbox) exited during startup (code {exitCode}). Output: {tail}"
                        + LaunchCmdSuffix(exitedLaunchCommand));
                }
                if (await ProbeHealthAsync(port, TimeSpan.FromSeconds(2), ct))
                {
                    return;
                }
                await Task.Delay(TimeSpan.FromSeconds(1), ct);
            }

            var lastOutput = SnapshotServerLog();
            var timeoutLaunchCommand = _serverLaunchCommand;
            StopServerInternal();
            throw new TimeoutException(
                $"crispasr (chatterbox) did not report healthy within 15 minutes. Last output: {lastOutput}"
                + LaunchCmdSuffix(timeoutLaunchCommand));
        }
        finally

View on GitHub (pinned to 17a9f07487)

Solutions

  1. Read the 'Output:' tail in the message — it usually names the real cause (missing .so/.dll, OOM, model path error).
  2. Delete the GGUFs in the configured models folder so they re-download fresh, then retry.
  3. Re-download CrispASR via Video → Audio to text → Engine settings → Re-download to eliminate a stale/ mismatched binary.
  4. Confirm the OS runtime prerequisites for crispasr (glibc/Metal/VC++ redistributable) are installed.
  5. If the tail shows an unrecognised assert, file an issue at https://github.com/CrispStrobe/CrispASR/issues with the full log.
Defensive patterns

Strategy: try-catch

Validate before calling

// Nothing to validate ahead of launch — the failure is inside the spawned process.
// Surface the captured 'Output:' tail to the user; the exit code + log are the diagnosis.

Try / catch

try { await engine.Speak(text, out, voice, lang, region, model, ct); }
catch (InvalidOperationException ex) when (ex.Message.Contains("exited during startup", StringComparison.Ordinal))
{
    Se.WriteToolsLog($"Chatterbox startup failed: {ex.Message}", true);
    // Offer re-download / model-folder reset in the UI; do not blind-retry the same state.
}

Prevention

When it happens

Trigger: EnsureServerRunningAsync launches crispasr with --backend chatterbox; process.HasExited becomes true within the 15-minute deadline; the captured tail does not contain 'unknown argument'/'unknown backend', the stale-cache assert, the turbo tokenizer mismatch, or the turbo startup-crash signature.

Common situations: Corrupt or partial GGUF model download; mismatched CrispASR build vs model files; missing OS runtime dependency (libgomp, Metal toolkit); a brand-new unrecognised upstream failure mode.

Related errors


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