{"record":{"id":"602d9b0e6c247d56","repo":"Zackriya-Solutions/meetily","slug":"no-parakeet-model-loaded-please-load-a-model-firs","errorCode":null,"errorMessage":"No Parakeet model loaded. Please load a model first.","messagePattern":"No Parakeet model loaded\\. Please load a model first\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":458,"sourceCode":"        unloaded\n    }\n\n    /// Get the currently loaded model name\n    pub async fn get_current_model(&self) -> Option<String> {\n        self.current_model_name.read().await.clone()\n    }\n\n    /// Check if a model is loaded\n    pub async fn is_model_loaded(&self) -> bool {\n        self.current_model.read().await.is_some()\n    }\n\n    /// Transcribe audio samples using the loaded Parakeet model\n    pub async fn transcribe_audio(&self, audio_data: Vec<f32>) -> Result<String> {\n        let mut model_guard = self.current_model.write().await;\n        let model = model_guard\n            .as_mut()\n            .ok_or_else(|| anyhow!(\"No Parakeet model loaded. Please load a model first.\"))?;\n\n        let duration_seconds = audio_data.len() as f64 / 16000.0; // Assuming 16kHz\n        log::debug!(\n            \"Parakeet transcribing {} samples ({:.1}s duration)\",\n            audio_data.len(),\n            duration_seconds\n        );\n\n        // Transcribe using Parakeet model\n        let result = model\n            .transcribe_samples(audio_data)\n            .map_err(|e| anyhow!(\"Parakeet transcription failed: {}\", e))?;\n\n        log::debug!(\"Parakeet transcription result: '{}'\", result.text);\n\n        Ok(result.text)\n    }\n","sourceCodeStart":440,"sourceCodeEnd":476,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L440-L476","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check parakeet_is_model_loaded / engine.is_model_loaded() before starting capture or transcription and gate the record button on it","Load the model during app startup (after confirming status Available) so it is ready before the first meeting","Use parakeet_validate_model_ready before recording to fail fast with a clear message","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"],"exampleFix":"// before\nlet text = engine.transcribe_audio(samples).await?;\n\n// after - ensure a model is loaded before transcribing\nif !engine.is_model_loaded().await {\n    let name = engine.get_current_model().await\n        .unwrap_or_else(|| \"parakeet-tdt-0.6b-v3-int8\".to_string());\n    engine.load_model(&name).await?;\n}\nlet text = engine.transcribe_audio(samples).await?;","handlingStrategy":"validation","validationCode":"// Gate recording/transcription on a loaded model\nif !engine.is_model_loaded().await {\n    let name = configured_parakeet_model(); // e.g. \"parakeet-tdt-0.6b-v3-int8\"\n    engine.load_model(&name).await?;\n}\n// or use the built-in preflight command from the frontend:\n// await invoke('parakeet_validate_model_ready');","typeGuard":"// Cheap boolean check exists on both sides\n// Rust: engine.is_model_loaded().await -> bool\n// TS:  const loaded = await invoke<boolean>('parakeet_is_model_loaded');\nfunction assertModelLoaded(loaded: boolean): void {\n  if (!loaded) throw new Error('Parakeet model not loaded - download and load it first');\n}","tryCatchPattern":"match engine.transcribe_audio(samples).await {\n    Err(e) if e.to_string().contains(\"No Parakeet model loaded\") => {\n        // stop the session, prompt the user to pick/load a model, buffer audio if needed\n    }\n    other => other?,\n}","preventionTips":["Auto-load the configured model at app startup and block the record button until is_model_loaded is true","Call parakeet_validate_model_ready before starting capture for a single upfront failure","On unload_model or failed load, immediately flip UI to a 'model not ready' state"],"tags":["parakeet","uninitialized-state","transcription","tauri"],"backgroundTag":"model-not-loaded","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}