{"record":{"id":"710a6880c392bed6","repo":"cjpais/Handy","slug":"transcribe-cpp-transcription-failed","errorCode":null,"errorMessage":"transcribe-cpp transcription failed: {}","messagePattern":"transcribe-cpp transcription failed: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src-tauri/src/managers/transcription.rs","lineNumber":1352,"sourceCode":"                        };\n\n                        debug!(\n                            \"transcribe-cpp run: task={:?}, language={:?}, initial_prompt={}\",\n                            run_options.task,\n                            run_options.language,\n                            run_options.family.is_some()\n                        );\n\n                        session\n                            .run(&audio, &run_options)\n                            .map(|t| {\n                                // Whisper's audio-based LID (auto mode only;\n                                // `None` when a language hint was passed).\n                                model_detected_language = t.language;\n                                t.text\n                            })\n                            .map_err(|e| {\n                                anyhow::anyhow!(\"transcribe-cpp transcription failed: {}\", e)\n                            })\n                    }\n                    LoadedEngine::Parakeet(parakeet_engine) => {\n                        let params = ParakeetParams {\n                            timestamp_granularity: Some(TimestampGranularity::Segment),\n                            ..Default::default()\n                        };\n                        parakeet_engine\n                            .transcribe_with(&audio, &params)\n                            .map(|r| r.text)\n                            .map_err(|e| anyhow::anyhow!(\"Parakeet transcription failed: {}\", e))\n                    }\n                    LoadedEngine::Moonshine(moonshine_engine) => moonshine_engine\n                        .transcribe(&audio, &TranscribeOptions::default())\n                        .map(|r| r.text)\n                        .map_err(|e| anyhow::anyhow!(\"Moonshine transcription failed: {}\", e)),\n                    LoadedEngine::MoonshineStreaming(streaming_engine) => streaming_engine\n                        .transcribe(&audio, &TranscribeOptions::default())","sourceCodeStart":1334,"sourceCodeEnd":1370,"githubUrl":"https://github.com/cjpais/Handy/blob/ba10ce1943ef34e93c09494027fc0b9ced2e8a44/src-tauri/src/managers/transcription.rs#L1334-L1370","documentation":"The whisper-family path calls session.run(&audio, &run_options) on the loaded transcribe-cpp GGML session; this error wraps any run failure with the library's chained message. Common causes are a run extension rejected by the loaded architecture (e.g. a non-whisper arch like Voxtral rejecting the whisper-kind extension with INVALID_ARG, issue #1601), GGML backend/GPU errors, or invalid input state.","triggerScenarios":"Loading a non-whisper GGUF that advertises InitialPrompt but rejects the whisper run extension; enabling translate or prompt options the loaded arch does not support; GPU backend returning an error mid-inference (context lost, out of VRAM); audio buffer malformed (all-zero/NaN samples after bad resampling).","commonSituations":"Using Voxtral or other new GGUF archs with whisper-only features enabled; VRAM exhausted by another app; driver reset; mismatched transcribe-cpp version after an update.","solutions":["Read the chained transcribe-cpp error text — INVALID_ARG on the run extension means the arch rejects whisper-specific options; disable translate/custom-words prompt for that model","Switch the transcribe accelerator setting to CPU to rule out GPU/VRAM issues","Reload the model (unload + load) to rebuild a possibly broken GGML context","Update Handy / transcribe-cpp if the arch is newly supported","Verify the recording pipeline produces sane f32 PCM (check audio device and resampler settings)"],"exampleFix":"// before: always attach the whisper run extension\nlet ext = WhisperRunOptions { translate, initial_prompt, ..Default::default() };\nrun_options.extension = Some(RunExtension::Whisper(ext));\n\n// after: gate the whisper-kind extension on the arch (see #1601)\nif model_is_whisper {\n    run_options.extension = Some(RunExtension::Whisper(ext));\n}","handlingStrategy":"try-catch","validationCode":"// gate whisper-only run options on the loaded arch before transcribe()\nif !model_is_whisper {\n    run_options.extension = None; // avoid INVALID_ARG from non-whisper archs (#1601)\n}","typeGuard":null,"tryCatchPattern":"match manager.transcribe(audio) {\n    Err(e) if e.to_string().contains(\"transcribe-cpp transcription failed\") => {\n        // inspect chained cause: provider error -> switch backend; INVALID_ARG -> drop whisper extension\n        if e.to_string().contains(\"INVALID_ARG\") { disable_prompt_and_translate(); }\n        manager.transcribe(audio) // single retry after remediation\n    }\n    other => other,\n}","preventionTips":["Keep translate/initial-prompt off for non-whisper GGUF archs (Voxtral etc.)","Watch VRAM usage; close other GPU-heavy apps before long sessions","Update transcribe-cpp alongside Handy so arch support stays in sync","Prefer the CPU accelerator to triage suspected GPU failures"],"tags":["rust","gguf","whisper","transcribe-cpp","inference"],"backgroundTag":"model-inference-failed","analyzedSha":"ba10ce1943ef34e93c09494027fc0b9ced2e8a44","analyzedAt":"2026-08-17T10:29:55.597Z","contentChangedAt":"2026-08-17T10:29:55.597Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}