{"record":{"id":"403b78a1324b8671","repo":"SubtitleEdit/subtitleedit","slug":"omnivoice-tts-models-not-found-in-getsetmodelsfol","errorCode":null,"errorMessage":"OmniVoice TTS models not found in {GetSetModelsFolder()}. Download them via the TTS download dialog.","messagePattern":"OmniVoice TTS models not found in (.+?)\\. Download them via the TTS download dialog\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"src/ui/Features/Video/TextToSpeech/Engines/OmniVoiceTtsCpp.cs","lineNumber":234,"sourceCode":"        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,\n            CreateNoWindow = true,\n            RedirectStandardInput = true,\n            RedirectStandardOutput = true,\n            RedirectStandardError = true,\n            StandardInputEncoding = Encoding.UTF8,\n        };\n","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/ui/Features/Video/TextToSpeech/Engines/OmniVoiceTtsCpp.cs#L216-L252","documentation":"FileNotFoundException thrown when either the omnivoice main model (GetModelBasePath) or the tokenizer/codec model (GetModelTokenizerPath) does not exist in the OmniVoice models folder. Both files are required by the omnivoice-tts CLI via its --model and --codec arguments.","triggerScenarios":"File.Exists(modelPath) or File.Exists(codecPath) returns false. The model filenames come from OmniVoiceDownloadService.ModelBaseFileName and ModelTokenizerFileName, so they depend on which release was pinned at download time.","commonSituations":"The user downloaded the engine binary but not the models (two-step download); the models were partially downloaded and one file is missing; the models folder was cleaned up; the download service was updated to new model filenames but the old files remain (or vice versa).","solutions":["Run the TTS download dialog to fetch the OmniVoice models (model + tokenizer pair).","Check IsModelsInstalled() before calling Speak() to detect the missing-models state early.","Verify both files exist: the model GGUF and the tokenizer GGUF in GetSetModelsFolder().","If the download service changed model filenames, delete the old files and re-download to get the current pair."],"exampleFix":"// before — throws mid-Speak if models are missing\nif (!File.Exists(modelPath) || !File.Exists(codecPath))\n    throw new FileNotFoundException($\"OmniVoice TTS models not found in {GetSetModelsFolder()}...\");\n\n// after — surface in the UI with a download action\nif (!IsModelsInstalled())\n{\n    await DialogService.ShowWarningAndAction(\n        $\"OmniVoice models not found in {GetSetModelsFolder()}.\",\n        \"Download models\", () => ShowDownloadDialog());\n    return;\n}","handlingStrategy":"validation","validationCode":"// Check both model files exist before synthesis\nif (!OmniVoiceTtsCpp.IsModelsInstalled())\n{\n    await ShowDownloadDialog(\"OmniVoice models not installed.\");\n    return;\n}","typeGuard":"null","tryCatchPattern":"catch (FileNotFoundException ex) when (ex.Message.Contains(\"models not found\"))\n{\n    await ShowDownloadDialog(\"Download OmniVoice models.\");\n    // Retry after download\n}","preventionTips":["Call IsModelsInstalled() before synthesis.","Verify both the model GGUF and tokenizer GGUF exist after download.","Re-download if file sizes don't match expected values."],"tags":["file-not-found","tts","omnivoice","models","installation","csharp"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}