{"record":{"id":"1ddedf715d3fb645","repo":"tonhowtf/omniget","slug":"o-whisper-cpp-nao-publica-binario-para-este-sistema-instale","errorCode":null,"errorMessage":"o whisper.cpp nao publica binario para este sistema; instale com `brew install whisper-cpp` ou aponte o caminho em Configuracoes","messagePattern":"o whisper\\.cpp nao publica binario para este sistema; instale com `brew install whisper-cpp` ou aponte o caminho em Configuracoes","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/whisper.rs","lineNumber":174,"sourceCode":"    } else {\n        vec![]\n    }\n}\n\nfn asset_name(variant: &str) -> anyhow::Result<&'static str> {\n    Ok(if cfg!(target_os = \"windows\") {\n        match variant {\n            \"cuda\" => \"whisper-cublas-12.4.0-bin-x64.zip\",\n            _ => \"whisper-bin-x64.zip\",\n        }\n    } else if cfg!(target_os = \"linux\") {\n        if cfg!(target_arch = \"aarch64\") {\n            \"whisper-bin-ubuntu-arm64.tar.gz\"\n        } else {\n            \"whisper-bin-ubuntu-x64.tar.gz\"\n        }\n    } else {\n        return Err(anyhow!(\n            \"o whisper.cpp nao publica binario para este sistema; instale com `brew install whisper-cpp` ou aponte o caminho em Configuracoes\"\n        ));\n    })\n}\n\npub async fn status() -> WhisperStatus {\n    let located = locate().await;\n    let (path, source) = match &located {\n        Some((p, s)) => (Some(p.clone()), *s),\n        None => (None, \"missing\"),\n    };\n    let version = match &path {\n        Some(p) => dependencies::check_version_at_path(p, \"whisper-cli\").await,\n        None => None,\n    };\n    let v = variants();\n    WhisperStatus {\n        installed: path.is_some(),","sourceCodeStart":156,"sourceCodeEnd":192,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/whisper.rs#L156-L192","documentation":"asset_name() maps the current OS/arch to a prebuilt whisper.cpp release asset. whisper.cpp only publishes binary packages for Windows x64 and Linux (Ubuntu x64/arm64); on any other platform (notably macOS) this anyhow! error is returned instead. The message tells the user to install whisper-cpp via Homebrew or point the binary path in the app's Settings (binary_overrides).","triggerScenarios":"Calling whisper::install(variant, progress) (or status()->can_install flows that call asset_name) on a platform where neither cfg!(target_os=\"windows\") nor cfg!(target_os=\"linux\") holds — in practice: running the macOS build and clicking install, or a cross-compile to an unsupported target.","commonSituations":"A macOS user tries the built-in whisper.cpp installer; a CI job cross-compiles the Tauri app for an OS with no upstream release asset; the codebase was updated to a target whisper.cpp no longer ships binaries for.","solutions":["On macOS run `brew install whisper-cpp` so locate() finds the system whisper-cli.","Or set a custom binary path via the app's Configuracoes (binary_overrides for \"whisper-cli\").","Check WhisperStatus.can_install / variants before showing an install button; on macOS use the install_hint instead.","If you need managed installs on a new platform, extend asset_name() with a mapping for that target."],"exampleFix":"// before\nlet exe = whisper::install(\"cpu\", &progress).await?;\n\n// after\nlet st = whisper::status().await;\nif st.can_install {\n    let exe = whisper::install(\"cpu\", &progress).await?;\n} else {\n    // macOS path: rely on system whisper-cli installed via brew, or custom override\n    eprintln!(\"instale com: {}\", st.install_hint);\n}","handlingStrategy":"validation","validationCode":"let st = whisper::status().await;\nif !st.can_install {\n    eprintln!(\"instale manualmente: {}\", st.install_hint); // e.g. \"brew install whisper-cpp\"\n}","typeGuard":null,"tryCatchPattern":"match whisper::install(variant, &progress).await {\n    Ok(path) => println!(\"installed at {}\", path.display()),\n    Err(e) if e.to_string().contains(\"nao publica binario\") => {\n        // fall back to system whisper-cli / brew install\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always check WhisperStatus.can_install before offering the install button.","On macOS prefer locate()/system install over managed install.","Use install_hint from status() to guide users."],"tags":["unsupported-platform","whisper-cpp","install"],"backgroundTag":"unsupported-platform","analyzedSha":"8600b91f4246848bac346874daa9e61c1fc5677a","analyzedAt":"2026-09-12T14:29:19.317Z","contentChangedAt":"2026-09-12T14:29:19.317Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}