Zackriya-Solutions/meetily · error · anyhow::Error

Parakeet transcription failed on segment {}: {}

Error message

Parakeet transcription failed on segment {}: {}

What it means

ParakeetEngine::transcribe_audio(segment.samples) returned Err for segment i. The inner '{}' names the engine-level failure: typically the model was unloaded or swapped by another task sharing the global PARAKEET_ENGINE, an ONNX runtime error, a malformed sample buffer, or memory exhaustion during inference.

Source

Thrown at frontend/src-tauri/src/audio/retranscription.rs:376

                i + 1,
                processable_count,
                segment_duration_sec
            ),
        );

        // Skip very short segments (< 100ms of audio = 1600 samples at 16kHz)
        if segment.samples.len() < 1600 {
            debug!("Skipping short segment {} with {} samples", i, segment.samples.len());
            continue;
        }

        // Transcribe this segment
        let (text, conf) = if use_parakeet {
            let engine = parakeet_engine.as_ref().unwrap();
            let text = engine
                .transcribe_audio(segment.samples.clone())
                .await
                .map_err(|e| anyhow!("Parakeet transcription failed on segment {}: {}", i, e))?;
            (text, 0.9f32)
        } else {
            let engine = whisper_engine.as_ref().unwrap();
            let (text, conf, _) = engine
                .transcribe_audio_with_confidence(segment.samples.clone(), language.clone())
                .await
                .map_err(|e| anyhow!("Whisper transcription failed on segment {}: {}", i, e))?;
            (text, conf)
        };

        // Skip empty transcripts
        let trimmed = text.trim();
        if !trimmed.is_empty() {
            debug!(
                "Segment {}/{}: {:.1}s, conf={:.2}, text='{}'",
                i + 1, processable_count, segment_duration_sec, conf,
                if trimmed.len() > 80 { let mut end = 80; while !trimmed.is_char_boundary(end) { end -= 1; } &trimmed[..end] } else { trimmed }
            );

View on GitHub (pinned to 0281737d87)

Solutions

  1. Read the inner error text - it names the exact engine failure (model not loaded vs runtime error vs OOM).
  2. Ensure no other transcription workload runs concurrently; wait for is_retranscription_in_progress() to return false before starting other engine work.
  3. Retry the retranscription once - transient ONNX and memory errors often clear.
  4. Reload the Parakeet model from Settings and confirm it reports as loaded before retranscribing.
Defensive patterns

Strategy: retry

Try / catch

// Retry once on engine inference failure, then surface the inner error
let attempt = engine.transcribe_audio(segment.samples.clone()).await;
let text = match attempt {
    Ok(t) => t,
    Err(e) => match engine.transcribe_audio(segment.samples.clone()).await {
        Ok(t) => { warn!("segment retry succeeded after: {e}"); t }
        Err(e2) => return Err(anyhow!("Parakeet transcription failed on segment {i}: {e2}")),
    },
};

Prevention

When it happens

Trigger: Retranscribing with provider='parakeet' while another operation (live transcription, import, a second retranscription of a different meeting) calls unload_engine_after_batch or load_model on the same global engine mid-loop; a segment containing NaN samples; ONNX/DirectML runtime failure on Windows.

Common situations: User starts an import or live recording while a long Parakeet retranscription is in progress; low RAM/VRAM with large models; GPU driver update breaking the ONNX execution provider.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16). Data as JSON: /api/errors/b2892babb42dca6c. Report an issue: GitHub.