{"record":{"id":"f9d500bd98c5cfe9","repo":"Zackriya-Solutions/meetily","slug":"no-speech-detected-in-audio-file","errorCode":null,"errorMessage":"No speech detected in audio file","messagePattern":"No speech detected in audio file","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"warning","filePath":"frontend/src-tauri/src/audio/retranscription.rs","lineNumber":296,"sourceCode":"            \"VAD segment stats: avg={:.0}ms, min={:.0}ms, max={:.0}ms, total_speech={:.1}s/{:.1}s ({:.0}%)\",\n            avg_duration, min_duration, max_duration,\n            total_speech_ms / 1000.0, duration_seconds,\n            (total_speech_ms / 1000.0 / duration_seconds) * 100.0\n        );\n        // Log first 10 segments for detailed inspection\n        for (i, seg) in speech_segments.iter().take(10).enumerate() {\n            let dur = seg.end_timestamp_ms - seg.start_timestamp_ms;\n            debug!(\"  Segment {}: {:.0}ms-{:.0}ms ({:.0}ms, {} samples)\",\n                i, seg.start_timestamp_ms, seg.end_timestamp_ms, dur, seg.samples.len());\n        }\n        if total_segments > 10 {\n            debug!(\"  ... and {} more segments\", total_segments - 10);\n        }\n    }\n\n    if total_segments == 0 {\n        warn!(\"No speech detected in audio\");\n        return Err(anyhow!(\"No speech detected in audio file\"));\n    }\n\n    emit_progress(&app, &meeting_id, \"transcribing\", 25, \"Loading transcription engine...\");\n\n    // Initialize the appropriate engine once (not per-segment)\n    let whisper_engine = if !use_parakeet {\n        Some(get_or_init_whisper(&app, model.as_deref()).await?)\n    } else {\n        None\n    };\n    let parakeet_engine = if use_parakeet {\n        Some(get_or_init_parakeet(&app, model.as_deref()).await?)\n    } else {\n        None\n    };\n\n    // Split very long segments at silence boundaries for better transcription quality.\n    // Hard cuts at arbitrary sample positions lose words at boundaries. Instead, scan","sourceCodeStart":278,"sourceCodeEnd":314,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/audio/retranscription.rs#L278-L314","documentation":"VAD scanned the entire decoded file and returned zero speech segments, so retranscription stops before loading any engine. This is a content condition, not a crash: nothing in the audio crossed the VAD speech-probability and energy thresholds (vad.rs rejects audio with RMS < 0.2 or peak < 0.20 as silence).","triggerScenarios":"Re-transcribing a recording that is silent, music-only, or extremely quiet; audio decoded with near-zero gain or a wrong sample rate so samples never reach speech energy; every candidate segment shorter than the 100ms / 1600-sample minimum.","commonSituations":"The original meeting captured the wrong input device and recorded silence; system-audio-only capture with no voices; an imported file that is background music; microphone gain set too low.","solutions":["Open the source audio file in a player and confirm it actually contains audible speech.","Check the preceding logs: 'Decoded audio: Xs' proves decode worked, and 'VAD detected 0 speech segments' proves the samples were too quiet - so the file, not the code, is the problem.","If speech is present but very quiet, re-export or amplify the audio, then retranscribe again.","Verify the correct microphone/system devices were selected for the original recording and re-record."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Cheap pre-check before starting retranscription: measure input energy\nfn audio_has_energy(samples: &[f32]) -> bool {\n    if samples.is_empty() { return false; }\n    let rms = (samples.iter().map(|x| x * x).sum::<f32>() / samples.len() as f32).sqrt();\n    let peak = samples.iter().fold(0.0f32, |a, x| a.max(x.abs()));\n    rms >= 0.2 && peak >= 0.20 // mirror vad.rs silence thresholds\n}\n// if !audio_has_energy(&samples) { return early with a friendly message }","typeGuard":null,"tryCatchPattern":"// Frontend: treat this as a content condition, not a crash\ntry { await invoke('start_retranscription', {...}); }\ncatch (e) {\n  if (String(e).includes('No speech detected')) showInfo('Recording contains no detectable speech');\n  else showError(e);\n}","preventionTips":["Verify the input device actually captures voices before long meetings (watch the live level meter).","Preview imported audio before retranscribing it.","Keep microphone gain above the VAD silence thresholds (RMS >= 0.2, peak >= 0.20)."],"tags":["vad","audio","speech-detection","retranscription"],"backgroundTag":"vad-no-speech-detected","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}