SubtitleEdit/subtitleedit · critical · FileNotFoundException

Qwen3 TTS server executable not found.

Error message

Qwen3 TTS server executable not found.

What it means

Thrown by EnsureServerRunningAsync when GetExecutableFileName() resolves to a path that does not exist on disk. It is a FileNotFoundException whose FileName carries the resolved exe path, surfaced before any Process.Start attempt so the user gets a precise 'what is missing' instead of a Win32 error.

Source

Thrown at src/ui/Features/Video/TextToSpeech/Engines/Qwen3TtsCpp.cs:349

        await ServerLock.WaitAsync(ct);
        try
        {
            if (_serverProcess is { HasExited: false } && _serverPort != 0 && _serverModelFileName == modelFileName)
            {
                return;
            }

            // Different model selected, or server not running — (re)start with the requested model.
            if (_serverProcess != null)
            {
                StopServerInternal();
            }

            var exe = GetExecutableFileName();
            if (!File.Exists(exe))
            {
                throw new FileNotFoundException("Qwen3 TTS server executable not found.", exe);
            }

            var port = FindFreeLoopbackPort();
            var psi = new ProcessStartInfo
            {
                WorkingDirectory = GetSetFolder(),
                FileName = exe,
                UseShellExecute = false,
                CreateNoWindow = true,
                RedirectStandardError = true,
                RedirectStandardOutput = true,
            };
            psi.ArgumentList.Add("-m");
            psi.ArgumentList.Add(GetSetModelsFolder());
            psi.ArgumentList.Add("--model-name");
            psi.ArgumentList.Add(modelFileName);
            psi.ArgumentList.Add("--host");
            psi.ArgumentList.Add("127.0.0.1");

View on GitHub (pinned to 17a9f07487)

Solutions

  1. Check the FileName in the exception — it tells you the exact resolved path that's missing.
  2. Re-run the Qwen3 TTS set installer/downloader so the binary is staged under the configured models folder.
  3. Verify GetSetFolder() in settings points at the folder that actually contains the executable for your OS.
  4. Confirm the OS-appropriate binary name exists (qwen3-tts-server.exe on Windows, qwen3-tts-server on Linux/macOS).
Defensive patterns

Strategy: validation

Validate before calling

var exe = GetExecutableFileName();
if (!File.Exists(exe))
    throw new FileNotFoundException("Qwen3 TTS server executable not found.", exe);
// Or, before calling Speak, surface a friendly 'install required' state in the UI:
var installed = File.Exists(GetExecutableFileName());

Try / catch

try { await EnsureServerRunningAsync(modelFileName, ct); }
catch (FileNotFoundException ex) when (ex.FileName == GetExecutableFileName())
{
    // Prompt the user to install the Qwen3 TTS bundle, then retry.
    await OfferInstallAsync();
}

Prevention

When it happens

Trigger: The Qwen3 TTS set folder was never installed or was partially deleted; GetExecutableFileName points at a per-OS binary name (qwen3-tts-server.exe / qwen3-tts-server) that the installer didn't stage for this platform; the user moved the set folder after configuration.

Common situations: First run on a machine where the Qwen3 TTS dependency bundle wasn't downloaded; a portable install where the path in settings points at a drive that's no longer mounted; cross-platform copy that brought only Windows binaries to Linux.

Related errors


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