{"record":{"id":"970246728d854e25","repo":"SubtitleEdit/subtitleedit","slug":"crispasr-madlad-model-not-found-please-use-the","errorCode":null,"errorMessage":"CrispASR MADLAD model not found - please use the 'Download' button to install it. Path: {_modelPath}","messagePattern":"CrispASR MADLAD model not found - please use the 'Download' button to install it\\. Path: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/libuilogic/AutoTranslate/CrispAsrMadladTranslate.cs","lineNumber":56,"sourceCode":"        }\n\n        public List<TranslationPair> GetSupportedTargetLanguages()\n        {\n            return ListLanguages();\n        }\n\n        public async Task<string> Translate(string text, string sourceLanguageCode, string targetLanguageCode, CancellationToken cancellationToken)\n        {\n            if (string.IsNullOrEmpty(_executablePath) || !File.Exists(_executablePath))\n            {\n                Error = \"CrispASR executable not found - please use the 'Download' button to install it. Path: \" + _executablePath;\n                throw new Exception(Error);\n            }\n\n            if (string.IsNullOrEmpty(_modelPath) || !File.Exists(_modelPath))\n            {\n                Error = \"CrispASR MADLAD model not found - please use the 'Download' button to install it. Path: \" + _modelPath;\n                throw new Exception(Error);\n            }\n\n            var startInfo = new ProcessStartInfo\n            {\n                FileName = _executablePath,\n                UseShellExecute = false,\n                RedirectStandardOutput = true,\n                RedirectStandardError = true,\n                CreateNoWindow = true,\n                StandardOutputEncoding = Encoding.UTF8,\n                StandardErrorEncoding = Encoding.UTF8,\n                WorkingDirectory = Path.GetDirectoryName(_executablePath) ?? string.Empty,\n            };\n            startInfo.ArgumentList.Add(\"--backend\");\n            startInfo.ArgumentList.Add(\"madlad\");\n            startInfo.ArgumentList.Add(\"-m\");\n            startInfo.ArgumentList.Add(_modelPath);\n            startInfo.ArgumentList.Add(\"--text\");","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/SubtitleEdit/subtitleedit/blob/17a9f0748781032255db3526b7215d2fb891e3af/src/libuilogic/AutoTranslate/CrispAsrMadladTranslate.cs#L38-L74","documentation":"Thrown by CrispAsrMadladTranslate.Translate when the MADLAD model path (_modelPath) is empty or the model file does not exist. The path comes from Configuration.Settings.Tools.AutoTranslateCrispAsrModel. The executable can be present but without the downloaded MADLAD-400 model the tool cannot translate.","triggerScenarios":"CrispASR executable is installed but the MADLAD model was never downloaded, was deleted, or AutoTranslateCrispAsrModel points to the wrong location. This check runs after the executable check passes.","commonSituations":"Partial install (binary downloaded, model not); model file moved or deleted; fresh machine with settings copied but model left behind; large model download interrupted.","solutions":["Use the 'Download' button for the CrispASR provider to fetch the MADLAD model.","Verify AutoTranslateCrispAsrModel points to an existing model file.","Re-download the MADLAD-400 model if the file is missing or truncated.","Ensure sufficient disk space for the model before downloading."],"exampleFix":"// before\nConfiguration.Settings.Tools.AutoTranslateCrispAsrModel = \"\";\n// after\nConfiguration.Settings.Tools.AutoTranslateCrispAsrModel = @\"C:\\Tools\\CrispASR\\madlad-400.bin\";","handlingStrategy":"validation","validationCode":"// Verify the MADLAD model exists before calling Translate\nvar model = Configuration.Settings.Tools.AutoTranslateCrispAsrModel;\nif (string.IsNullOrEmpty(model) || !File.Exists(model))\n{\n    Console.WriteLine(\"MADLAD model missing. Use the Download button or set AutoTranslateCrispAsrModel.\");\n    return;\n}","typeGuard":null,"tryCatchPattern":"try\n{\n    var result = await translator.Translate(text, src, tgt, ct);\n}\ncatch (Exception ex) when (ex.Message.Contains(\"MADLAD model not found\"))\n{\n    // prompt user to download the model\n    logger.Error(ex.Message);\n}","preventionTips":["Download the MADLAD model via the Download button after installing the binary.","Keep the model in a stable path with enough disk space.","Validate File.Exists(model) before enabling the provider.","Re-download if the model file size looks truncated."],"tags":["auto-translate","crispasr","missing-file","configuration","local-tool","model"],"backgroundTag":null,"analyzedSha":"17a9f0748781032255db3526b7215d2fb891e3af","analyzedAt":"2026-08-13T18:11:43.374Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}