SubtitleEdit/subtitleedit · error · InvalidOperationException

VibeVoice (CrispASR) — the crispasr server crashed during sy

Error message

VibeVoice (CrispASR) — the crispasr server crashed during synthesis. | VibeVoice (CrispASR) request failed — the connection to the crispasr server was dropped.{Environment.NewLine}Server log:{Environment.NewLine}{serverLog}{LaunchCmdSuffix}

What it means

InvalidOperationException thrown when HttpClient.PostAsync to /v1/audio/speech raises an HttpRequestException. The message branches on _serverProcess.HasExited: 'crashed during synthesis' if the server died, 'connection was dropped' otherwise. The captured server log and launch command are appended, and the original HttpRequestException is chained as InnerException.

Source

Thrown at src/ui/Features/Video/TextToSpeech/Engines/VibeVoiceCrispAsr.cs:411

            response = await HttpClient.PostAsync($"{ServerBaseUrl}/v1/audio/speech", content, cancellationToken);
        }
        catch (HttpRequestException ex)
        {
            var serverLog = SnapshotServerLog();
            var launchCommand = _serverLaunchCommand;
            var died = _serverProcess?.HasExited == true;
            if (died)
            {
                StopServerInternal();
            }

            var failMsg = $"VibeVoice (CrispASR) request failed — Voice: {vibeVoice}, Text: {text}, "
                + $"RequestJson: {body}, ServerExited: {died}, ServerLog: {serverLog}"
                + LaunchCmdSuffix(launchCommand);
            Se.LogError(ex, failMsg);
            Se.WriteToolsLog(failMsg);

            throw new InvalidOperationException(
                (died
                    ? "VibeVoice (CrispASR) — the crispasr server crashed during synthesis."
                    : "VibeVoice (CrispASR) request failed — the connection to the crispasr server was dropped.")
                + (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 = $"VibeVoice (CrispASR) server error {(int)response.StatusCode} {response.StatusCode} — "
                    + $"Voice: {vibeVoice}, Text: {text}, RequestJson: {body}, "
                    + $"ResponseBody: {errorBody}, ServerLog: {serverLog}"

View on GitHub (pinned to 17a9f07487)

Solutions

  1. Use the crashed-vs-dropped branch to narrow cause: 'crashed' → read the server log for the abort reason; 'dropped' → socket/network.
  2. Shorten input text or use a smaller VibeVoice quant to lower peak memory.
  3. Ensure nothing else stops/restarts the crispasr server while synthesis is in flight.
  4. Re-import the reference voice if the server log shows it can't read the WAV.
Defensive patterns

Strategy: try-catch

Validate before calling

if (_serverProcess is not { HasExited: false })
    throw new InvalidOperationException("crispasr server is not running.");

Try / catch

try { response = await HttpClient.PostAsync($"{ServerBaseUrl}/v1/audio/speech", content, ct); }
catch (HttpRequestException ex)
{
    var died = _serverProcess?.HasExited == true;
    throw new InvalidOperationException(died ? "crispasr crashed" : "connection dropped", ex);
}

Prevention

When it happens

Trigger: Server OOM/abort during synthesis; loopback socket reset; server killed by another code path mid-request; the reference voice file referenced by the payload was removed after server start, causing the server to abort.

Common situations: Long input exhausts GPU memory; concurrent Speak races a server restart; antivirus kills the child process; reference WAV deleted out from under the server.

Related errors


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