{"record":{"id":"6a05f100a8e4165d","repo":"tonhowtf/omniget","slug":"whisper-cli-nao-esta-instalado","errorCode":null,"errorMessage":"whisper-cli nao esta instalado","messagePattern":"whisper-cli nao esta instalado","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/whisper.rs","lineNumber":319,"sourceCode":"                continue;\n            }\n            cues.push(Cue {\n                start_ms: from,\n                end_ms: to.max(from + 1),\n                text: t,\n            });\n        }\n    }\n    Ok((language, cues))\n}\n\npub async fn transcribe(\n    opts: TranscribeOptions,\n    progress: ProgressFn,\n) -> anyhow::Result<TranscribeResult> {\n    let (bin, _) = locate()\n        .await\n        .ok_or_else(|| anyhow!(\"whisper-cli nao esta instalado\"))?;\n    let model_path = models_dir()\n        .ok_or_else(|| anyhow!(\"Could not determine data directory\"))?\n        .join(format!(\"ggml-{}.bin\", opts.model));\n    if !model_path.exists() {\n        return Err(anyhow!(\"modelo {} nao esta baixado\", opts.model));\n    }\n    let input = PathBuf::from(&opts.input);\n    if !input.exists() {\n        return Err(anyhow!(\"arquivo nao encontrado: {}\", opts.input));\n    }\n    let id = format!(\"transcribe:{}\", opts.input);\n    report(&progress, &id, \"convert\", 0, Some(100), None);\n    let started = std::time::Instant::now();\n    let wav = to_wav16k(&input).await?;\n    let out_prefix = super::temp_dir().join(format!(\"whisper-{}\", uuid::Uuid::new_v4()));\n\n    let mut cmd = crate::core::process::command(&bin);\n    cmd.arg(\"-m\").arg(&model_path).arg(\"-f\").arg(&wav);","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/whisper.rs#L301-L337","documentation":"transcribe() first calls locate(), which resolves whisper-cli from (1) the user's custom override, (2) the managed install dir, or (3) system PATH (whisper-cli, whisper-cpp, whisper). If none is found, transcription cannot start and this error is returned. It means no whisper.cpp binary is available anywhere the app looks.","triggerScenarios":"Calling transcribe(TranscribeOptions{..}, progress) when: whisper-cli was never installed, the managed install was deleted, the custom binary path in Configuracoes points at a removed file, and nothing named whisper-cli/whisper-cpp/whisper is on PATH.","commonSituations":"Fresh install of the app where the user skipped the whisper.cpp setup step; macOS user who never ran `brew install whisper-cpp`; a system PATH change (new shell environment) hiding an existing install.","solutions":["Install the managed binary via whisper::install(\"cpu\", ..) (Windows/Linux).","On macOS run `brew install whisper-cpp`.","Or set the whisper-cli path in the app's Configuracoes (binary_overrides).","Gate transcription behind whisper::status().installed and surface the install_hint."],"exampleFix":"// before\nlet r = whisper::transcribe(opts, progress).await?;\n\n// after\nlet st = whisper::status().await;\nanyhow::ensure!(st.installed, \"whisper-cli ausente: {}\", st.install_hint);\nlet r = whisper::transcribe(opts, progress).await?;","handlingStrategy":"validation","validationCode":"let st = whisper::status().await;\nif !st.installed {\n    eprintln!(\"whisper-cli ausente. {}\", st.install_hint); // \"brew install whisper-cpp\" on macOS\n    return;\n}","typeGuard":null,"tryCatchPattern":"match whisper::transcribe(opts, progress).await {\n    Err(e) if e.to_string().contains(\"nao esta instalado\") => {\n        // trigger the install flow or instruct `brew install whisper-cpp`\n    }\n    other => other?,\n}","preventionTips":["Check status().installed before enabling transcribe UI.","On macOS ensure whisper-cpp is installed via Homebrew.","Set a binary override in Configuracoes for non-standard installs."],"tags":["missing-dependency","whisper-cpp","binary-not-installed"],"backgroundTag":"missing-dependency","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}