{"record":{"id":"01d1ef9ab5174af5","repo":"Zackriya-Solutions/meetily","slug":"parakeet-transcription-failed-on-segment","errorCode":null,"errorMessage":"Parakeet transcription failed on segment {}: {}","messagePattern":"Parakeet transcription failed on segment (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/audio/import.rs","lineNumber":587,"sourceCode":"        );\n\n        // Skip very short segments\n        if segment.samples.len() < 1600 {\n            debug!(\n                \"Skipping short segment {} with {} samples\",\n                i,\n                segment.samples.len()\n            );\n            continue;\n        }\n\n        // Transcribe\n        let (text, conf) = if use_parakeet {\n            let engine = parakeet_engine.as_ref().unwrap();\n            let text = engine\n                .transcribe_audio(segment.samples.clone())\n                .await\n                .map_err(|e| anyhow!(\"Parakeet transcription failed on segment {}: {}\", i, e))?;\n            (text, 0.9f32)\n        } else {\n            let engine = whisper_engine.as_ref().unwrap();\n            let (text, conf, _) = engine\n                .transcribe_audio_with_confidence(segment.samples.clone(), language.clone())\n                .await\n                .map_err(|e| anyhow!(\"Whisper transcription failed on segment {}: {}\", i, e))?;\n            (text, conf)\n        };\n\n        let trimmed = text.trim();\n        if !trimmed.is_empty() {\n            debug!(\n                \"Segment {}/{}: {:.1}s, conf={:.2}, text='{}'\",\n                i + 1, processable_count, segment_duration_sec, conf,\n                if trimmed.len() > 80 { let mut end = 80; while !trimmed.is_char_boundary(end) { end -= 1; } &trimmed[..end] } else { trimmed }\n            );\n            all_transcripts.push((text, segment.start_timestamp_ms, segment.end_timestamp_ms));","sourceCodeStart":569,"sourceCodeEnd":605,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/audio/import.rs#L569-L605","documentation":"`ParakeetEngine::transcribe_audio(segment.samples)` returned Err for segment i; the engine's own error chain follows the colon. The `?` aborts the entire import on a single failing segment, discarding all prior transcription. On the success path confidence is hardcoded to 0.9, so confidence is never the problem — this is an engine/inference failure.","triggerScenarios":"Import with provider == 'parakeet' and >0 VAD segments: the engine was initialized (get_or_init_parakeet succeeded) but inference fails — ONNX session invalidated by a concurrent model swap, execution provider (CUDA/CoreML/DirectML) error mid-run, or a segment whose sample length the model rejects.","commonSituations":"Switching the provider to parakeet without its model fully downloaded; a GPU driver update breaking the ONNX execution provider; engine state disturbed by another command between import init and the segment loop.","solutions":["Read the inner error after the colon — it names the actual cause (model file missing vs execution provider failure vs input shape)","Verify the parakeet model files exist and appear in discover_models() results before importing","Retry the import with provider 'whisper' to isolate a parakeet-specific failure","If the inner error is provider-related (CUDA/DirectML/CoreML), switch the execution provider to CPU or update the ONNX runtime"],"exampleFix":"// before — one failing segment aborts everything\nlet text = engine.transcribe_audio(segment.samples.clone()).await\n    .map_err(|e| anyhow!(\"Parakeet transcription failed on segment {}: {}\", i, e))?;\n\n// after — skip failing segments, keep the import alive\nlet text = match engine.transcribe_audio(segment.samples.clone()).await {\n    Ok(t) => t,\n    Err(e) => {\n        warn!(\"Parakeet failed on segment {}, skipping: {}\", i, e);\n        continue;\n    }\n};","handlingStrategy":"fallback","validationCode":"// confirm the parakeet model is present before import\nconst models = await invoke<string[]>('list_models', { engine: 'parakeet' });\nif (!models.includes(requestedModel)) {\n  throw new Error(`Parakeet model ${requestedModel} is not downloaded`);\n}","typeGuard":null,"tryCatchPattern":"Catch per segment rather than per import: on engine.transcribe_audio error, log `warn!(\"segment {} failed: {}\", i, e)`, `continue`, and report a partial-meeting warning at the end — fall back to the whisper provider for the whole file if every segment fails.","preventionTips":["Download and verify the parakeet model before selecting it as provider","Do not switch models or providers while an import is running","Keep the ONNX execution provider runtime (CUDA/CoreML/DirectML) matched to the installed driver"],"tags":["parakeet","onnx","transcription","stt","segment","rust"],"backgroundTag":"stt-transcription-failure","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}