{"record":{"id":"aae475bb7c930112","repo":"tonhowtf/omniget","slug":"nao-entendi-nada","errorCode":null,"errorMessage":"nao entendi nada","messagePattern":"nao entendi nada","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src-tauri/omniget-core/src/core/tools/dictation.rs","lineNumber":318,"sourceCode":"        let t = super::whisper::transcribe(\n            super::whisper::TranscribeOptions {\n                input: rec.wav.to_string_lossy().to_string(),\n                model: opts.model.clone(),\n                language: opts.language.clone(),\n                translate: false,\n                max_len: 0,\n                prompt: String::new(),\n                output_dir: out_dir.to_string_lossy().to_string(),\n                threads: 0,\n            },\n            progress.clone(),\n        )\n        .await?;\n        let _ = std::fs::remove_file(&rec.wav);\n        let _ = std::fs::remove_dir_all(&out_dir);\n        let mut text = t.text.split_whitespace().collect::<Vec<_>>().join(\" \");\n        if text.is_empty() {\n            return Err(anyhow!(\"nao entendi nada\"));\n        }\n        if opts.trailing_space {\n            text.push(' ');\n        }\n        Ok(text)\n    }\n    .await;\n    set_phase(\"idle\");\n    match result {\n        Ok(text) => {\n            *LAST.lock().unwrap_or_else(|e| e.into_inner()) = Some((text.clone(), None));\n            super::report(\n                &progress,\n                \"dictation\",\n                \"done\",\n                1,\n                Some(1),\n                Some(text.clone()),","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/tonhowtf/omniget/blob/8600b91f4246848bac346874daa9e61c1fc5677a/src-tauri/omniget-core/src/core/tools/dictation.rs#L300-L336","documentation":"stop() transcribes the recorded WAV and, after normalizing whitespace, throws 'nao entendi nada' ('didn't understand anything') if the transcription result is empty. This distinguishes a successful capture+transcription pipeline from one that produced no words.","triggerScenarios":"The speech-to-text engine returns empty or whitespace-only text for the recorded audio.","commonSituations":"User recorded only silence or noise too short/quiet to transcribe; mic gain too low; wrong language/model selected for transcription; user released the hotkey immediately (sub-400ms audio, only padding).","solutions":["Record again, speaking clearly and holding the recording at least a second.","Check that the transcription model/language setting matches the language actually spoken.","Verify microphone input level in OS settings — if capture is fine but text is always empty, the transcription backend/config is the problem.","Handle the empty-text case gracefully in the UI (show 'nothing recognized' instead of a hard error)."],"exampleFix":"null","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"let text = match dictation::stop(progress).await {\n    Ok(t) if !t.is_empty() => t,\n    Ok(_) | Err(e) if e.to_string().contains(\"nao entendi nada\") => String::new(), // show 'nothing recognized'\n    Err(e) => return Err(e),\n};","preventionTips":["Require a minimum recording duration (e.g. > 1s) before allowing stop().","Check mic input level during recording and warn on silence.","Match the transcription model/language to the user's locale."],"tags":["dictation","speech-to-text","empty-result","audio"],"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"}