{"record":{"id":"e9d71efc411ef71f","repo":"tonhowtf/omniget","slug":"entrada","errorCode":null,"errorMessage":"entrada: {}","messagePattern":"entrada: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/voicestudio.rs","lineNumber":493,"sourceCode":"        matched,\n        unmatched,\n        profile_id,\n    })\n}\n\n/// Demucs no VoiceStudio: devolve só a voz. O instrumental é a diferença,\n/// feita aqui com o FFmpeg (voz invertida somada ao original).\npub async fn isolate(\n    base_url: &str,\n    input: &str,\n    output_dir: &str,\n    instrumental: bool,\n    progress: super::ProgressFn,\n) -> anyhow::Result<Vec<String>> {\n    let b = base(base_url);\n    let c = client(1800)?;\n    super::report(&progress, \"voicestudio\", \"upload\", 0, None, None);\n    let data = std::fs::read(input).map_err(|e| anyhow!(\"entrada: {}\", e))?;\n    let file_name = Path::new(input)\n        .file_name()\n        .map(|s| s.to_string_lossy().to_string())\n        .unwrap_or_else(|| \"audio.wav\".into());\n    let form = reqwest::multipart::Form::new().part(\n        \"audio\",\n        reqwest::multipart::Part::bytes(data).file_name(file_name),\n    );\n    super::report(&progress, \"voicestudio\", \"separate\", 0, None, None);\n    let resp = c\n        .post(format!(\"{}/clean-audio\", b))\n        .multipart(form)\n        .send()\n        .await?;\n    let stem = Path::new(input)\n        .file_stem()\n        .map(|s| s.to_string_lossy().to_string())\n        .unwrap_or_else(|| \"audio\".into());","sourceCodeStart":475,"sourceCodeEnd":511,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/voicestudio.rs#L475-L511","documentation":"isolate reads the input audio file with std::fs::read before uploading it as multipart for source separation, wrapping failures as 'entrada: {}' (input: {}). It means the file to be processed could not be read from disk.","triggerScenarios":"The `input` path passed to isolate does not exist, is a directory, or is unreadable due to permissions at the start of vocal/instrumental isolation.","commonSituations":"Stale path after a previous processing step moved/renamed the file, wrong path from the UI, file on an unmounted volume, or antivirus/another process locking the file.","solutions":["Read the inner OS error: NotFound → correct the path; PermissionDenied → fix permissions.","Validate the input path with Path::is_file before calling isolate.","Confirm the upstream step that produced the input file actually succeeded and wrote it.","Check for file locks (close players/editors holding the file) and remount network volumes."],"exampleFix":"// before\nlet data = std::fs::read(input).map_err(|e| anyhow!(\"entrada: {}\", e))?;\n// after\nlet in_path = Path::new(input);\nanyhow::ensure!(in_path.is_file(), \"entrada: arquivo ausente: {}\", input);\nlet data = std::fs::read(in_path).map_err(|e| anyhow!(\"entrada: {}\", e))?;","handlingStrategy":"validation","validationCode":"fn validate_isolate_input(path: &str) -> Result<(), String> {\n    let p = std::path::Path::new(path);\n    if !p.is_file() { return Err(format!(\"input not a file: {path}\")); }\n    let len = std::fs::metadata(p).map(|m| m.len()).unwrap_or(0);\n    if len == 0 { return Err(\"input file is empty\".into()); }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match std::fs::read(input) {\n    Err(e) if e.kind() == std::io::ErrorKind::NotFound => eprintln!(\"entrada nao encontrada: {input}\"),\n    Err(e) if e.kind() == std::io::ErrorKind::PermissionDenied => eprintln!(\"sem permissao: {input}\"),\n    other => other?,\n}","preventionTips":["Validate the input path immediately before calling isolate.","Confirm the previous pipeline step wrote its output successfully before starting isolation.","Keep intermediates in a stable directory to avoid stale-path failures.","Close players/editors that may lock the audio file during processing."],"tags":["file-io","file-not-found","rust","audio"],"backgroundTag":"file-read-failed","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"}