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

No Parakeet model loaded. Please load a model first.

Error message

No Parakeet model loaded. Please load a model first.

What it means

Returned by transcribe_audio when the current_model RwLock holds None, i.e. no ParakeetModel has been loaded (or the previous one was unloaded). The engine keeps a single current model, so transcription requires a successful load_model beforehand; this is the guard before model.transcribe_samples runs.

Source

Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:458

        unloaded
    }

    /// Get the currently loaded model name
    pub async fn get_current_model(&self) -> Option<String> {
        self.current_model_name.read().await.clone()
    }

    /// Check if a model is loaded
    pub async fn is_model_loaded(&self) -> bool {
        self.current_model.read().await.is_some()
    }

    /// Transcribe audio samples using the loaded Parakeet model
    pub async fn transcribe_audio(&self, audio_data: Vec<f32>) -> Result<String> {
        let mut model_guard = self.current_model.write().await;
        let model = model_guard
            .as_mut()
            .ok_or_else(|| anyhow!("No Parakeet model loaded. Please load a model first."))?;

        let duration_seconds = audio_data.len() as f64 / 16000.0; // Assuming 16kHz
        log::debug!(
            "Parakeet transcribing {} samples ({:.1}s duration)",
            audio_data.len(),
            duration_seconds
        );

        // Transcribe using Parakeet model
        let result = model
            .transcribe_samples(audio_data)
            .map_err(|e| anyhow!("Parakeet transcription failed: {}", e))?;

        log::debug!("Parakeet transcription result: '{}'", result.text);

        Ok(result.text)
    }

View on GitHub (pinned to 0281737d87)

Solutions

  1. Check parakeet_is_model_loaded / engine.is_model_loaded() before starting capture or transcription and gate the record button on it
  2. Load the model during app startup (after confirming status Available) so it is ready before the first meeting
  3. Use parakeet_validate_model_ready before recording to fail fast with a clear message
  4. On this error, trigger load_model for the configured model name and surface a 'model not ready' state to the user instead of dropping audio

Example fix

// before
let text = engine.transcribe_audio(samples).await?;

// after - ensure a model is loaded before transcribing
if !engine.is_model_loaded().await {
    let name = engine.get_current_model().await
        .unwrap_or_else(|| "parakeet-tdt-0.6b-v3-int8".to_string());
    engine.load_model(&name).await?;
}
let text = engine.transcribe_audio(samples).await?;
Defensive patterns

Strategy: validation

Validate before calling

// Gate recording/transcription on a loaded model
if !engine.is_model_loaded().await {
    let name = configured_parakeet_model(); // e.g. "parakeet-tdt-0.6b-v3-int8"
    engine.load_model(&name).await?;
}
// or use the built-in preflight command from the frontend:
// await invoke('parakeet_validate_model_ready');

Type guard

// Cheap boolean check exists on both sides
// Rust: engine.is_model_loaded().await -> bool
// TS:  const loaded = await invoke<boolean>('parakeet_is_model_loaded');
function assertModelLoaded(loaded: boolean): void {
  if (!loaded) throw new Error('Parakeet model not loaded - download and load it first');
}

Try / catch

match engine.transcribe_audio(samples).await {
    Err(e) if e.to_string().contains("No Parakeet model loaded") => {
        // stop the session, prompt the user to pick/load a model, buffer audio if needed
    }
    other => other?,
}

Prevention

When it happens

Trigger: Calling parakeet_transcribe_audio / engine.transcribe_audio on app startup before any load; after unload_model (explicitly, or implicitly when load_model swaps models and fails); after a previous load_model returned an error so current_model was never set; calling from the audio pipeline before the settings screen loaded a model.

Common situations: Recording started before the model finished loading (large models take seconds to build ONNX sessions); model auto-load at startup was skipped because the model was Missing; a load error was swallowed and the pipeline still tried to transcribe.

Related errors


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