{"record":{"id":"c4b38ff447a17e5d","repo":"SubtitleEdit/subtitleedit","slug":"omnivoice-tts-executable-not-found","errorCode":null,"errorMessage":"omnivoice-tts executable not found.","messagePattern":"omnivoice-tts executable not found\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"src/ui/Features/Video/TextToSpeech/Engines/OmniVoiceTtsCpp.cs","lineNumber":227,"sourceCode":"\n    public async Task<TtsResult> Speak(\n        string text,\n        string outputFolder,\n        Voice voice,\n        TtsLanguage? language,\n        string? region,\n        string? model,\n        CancellationToken cancellationToken)\n    {\n        if (voice.EngineVoice is not OmniVoice omniVoice)\n        {\n            throw new ArgumentException(\"Voice is not an OmniVoice\");\n        }\n\n        var exe = GetExecutableFileName();\n        if (!File.Exists(exe))\n        {\n            throw new FileNotFoundException(\"omnivoice-tts executable not found.\", exe);\n        }\n\n        var modelPath = GetModelBasePath();\n        var codecPath = GetModelTokenizerPath();\n        if (!File.Exists(modelPath) || !File.Exists(codecPath))\n        {\n            throw new FileNotFoundException(\n                $\"OmniVoice TTS models not found in {GetSetModelsFolder()}. Download them via the TTS download dialog.\");\n        }\n\n        var outputFileName = Path.Combine(TtsOutputFolder.Resolve(outputFolder, GetSetFolder), Guid.NewGuid() + \".wav\");\n        var inputText = text;\n\n        var psi = new ProcessStartInfo\n        {\n            WorkingDirectory = GetSetFolder(),\n            FileName = exe,\n            UseShellExecute = false,","sourceCodeStart":209,"sourceCodeEnd":245,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Features/Video/TextToSpeech/Engines/OmniVoiceTtsCpp.cs#L209-L245","documentation":"FileNotFoundException thrown at the start of OmniVoiceTtsCpp.Speak when the omnivoice-tts binary does not exist at GetExecutableFileName() (the OmniVoice folder under Se.TextToSpeechFolder). Unlike the CrispASR engines, this is a standalone CLI binary, not a shared runtime.","triggerScenarios":"Calling Speak() on the OmniVoice TTS engine when the omnivoice-tts (or omnivoice-tts.exe on Windows) executable has not been downloaded. The check is File.Exists(exe) returning false.","commonSituations":"User picked OmniVoice TTS without running the download dialog; the OmniVoice folder was deleted; the binary was quarantined by antivirus; the user is on a platform (e.g., FreeBSD) for which no prebuilt binary was downloaded.","solutions":["Run the TTS download dialog to fetch omnivoice-tts via OmniVoiceDownloadService.","Check GetExecutableFileName() resolves to the correct OS-specific name (.exe on Windows, bare name elsewhere).","Verify the folder Se.TextToSpeechFolder/OmniVoice exists and contains the binary.","Add an antivirus exclusion if the binary keeps disappearing after download."],"exampleFix":"// before\nvar exe = GetExecutableFileName();\nif (!File.Exists(exe))\n    throw new FileNotFoundException(\"omnivoice-tts executable not found.\", exe);\n\n// after — check IsInstalled and guide the user before Speak\nif (!await engine.IsInstalled(region))\n{\n    await ShowDownloadDialog(nameof(OmniVoiceTtsCpp));\n    return;\n}","handlingStrategy":"validation","validationCode":"// Check before synthesis\nif (!File.Exists(OmniVoiceTtsCpp.GetExecutableFileName()))\n{\n    await ShowDownloadDialog(\"omnivoice-tts binary not installed.\");\n    return;\n}","typeGuard":"null","tryCatchPattern":"catch (FileNotFoundException ex) when (ex.Message.Contains(\"omnivoice-tts executable not found\"))\n{\n    await ShowDownloadDialog(nameof(OmniVoiceDownloadService));\n    // Retry after download\n}","preventionTips":["Call IsInstalled() before synthesis.","Run the TTS download dialog to fetch the omnivoice-tts binary.","Add an antivirus exclusion for the SE TextToSpeech/OmniVoice folder."],"tags":["file-not-found","tts","omnivoice","installation","csharp"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}