{"record":{"id":"d84d29182af8fc38","repo":"tonhowtf/omniget","slug":"a-transcri-o-saiu-vazia","errorCode":null,"errorMessage":"a transcrição saiu vazia","messagePattern":"a transcrição saiu vazia","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src-tauri/omniget-core/src/core/tools/yt_notes.rs","lineNumber":521,"sourceCode":"        let r = transcribe(&path, &opts, progress.clone()).await?;\n        if meta.title.is_empty() {\n            meta.title = path\n                .file_stem()\n                .map(|s| s.to_string_lossy().to_string())\n                .unwrap_or_default();\n        }\n        meta.language = r.language.clone();\n        meta.duration_seconds = r.seconds;\n        cues = r.cues;\n        source = \"whisper\".to_string();\n    } else {\n        return Err(anyhow!(\n            \"informe um link, uma legenda ou um arquivo de mídia\"\n        ));\n    }\n\n    if cues.is_empty() {\n        return Err(anyhow!(\"a transcrição saiu vazia\"));\n    }\n    super::report(&progress, ID, \"progress\", 4, Some(4), None);\n    let chapters = if opts.use_chapters {\n        meta.chapters.clone()\n    } else {\n        Vec::new()\n    };\n    let boundaries: Vec<i64> = chapters.iter().map(|c| c.start_ms).collect();\n    let paragraphs = stitch_at(&cues, &boundaries, &opts.stitch);\n    let doc = NotesDoc {\n        title: meta.title.clone(),\n        channel: meta.channel.clone(),\n        url: meta.url.clone(),\n        duration_seconds: meta.duration_seconds,\n        language: meta.language.clone(),\n        generated: chrono::Local::now().format(\"%Y-%m-%d\").to_string(),\n        chapters: chapters.clone(),\n        paragraphs: paragraphs.clone(),","sourceCodeStart":503,"sourceCodeEnd":539,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/yt_notes.rs#L503-L539","documentation":"After the source is resolved, `run` checks that the collected subtitle cues are non-empty. If transcription/download produced zero cues, the tool aborts with \"a transcrição saiu vazia\" because there is nothing to build notes from. This catches videos with no captions, empty caption tracks, or a Whisper run that returned no segments.","triggerScenarios":"`cues.is_empty()` after source selection: video has no subtitle track, the fetched caption track is empty, or the Whisper transcription returned no cues.","commonSituations":"A YouTube video with captions disabled; a caption track that exists but contains no entries; audio too short/silent for Whisper to produce segments; wrong language selected yielding an empty track.","solutions":["Choose a video that has available captions or check the URL points to the intended video.","Fall back to the Whisper path by supplying a media file when captions are empty.","Check for region/age restrictions that make the caption track inaccessible.","Retry if the failure was transient (caption fetch occasionally returns empty on throttling)."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match run(opts).await {\n    Err(e) if e.to_string().contains(\"transcrição saiu vazia\") => {\n        // fall back to whisper path with a media file\n    }\n    other => other?,\n}","preventionTips":["Prefer videos known to have captions; otherwise always provide a media file.","Check caption availability for the URL before invoking.","Handle empty-transcription explicitly in the calling workflow."],"tags":["empty-result","transcription","subtitles","rust"],"backgroundTag":"empty-result-set","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"}