{"record":{"id":"f0ef5d965b7b32fb","repo":"Zackriya-Solutions/meetily","slug":"no-transcription-result-returned","errorCode":null,"errorMessage":"No transcription result returned","messagePattern":"No transcription result returned","errorType":"exception","errorClass":"ParakeetError","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/model.rs","lineNumber":490,"sourceCode":"    pub fn transcribe_samples(\n        &mut self,\n        samples: Vec<f32>,\n    ) -> Result<TimestampedResult, ParakeetError> {\n        let batch_size = 1;\n        let samples_len = samples.len();\n\n        // Create waveforms array [batch_size, samples_len]\n        let waveforms = Array2::from_shape_vec((batch_size, samples_len), samples)?.into_dyn();\n\n        // Create waveforms_lens array [batch_size] with the actual length\n        let waveforms_lens = Array1::from_vec(vec![samples_len as i64]).into_dyn();\n\n        // Run recognition to get detailed results\n        let results = self.recognize_batch(&waveforms.view(), &waveforms_lens.view())?;\n\n        // Extract the first (and only) result\n        let timestamped_result = results.into_iter().next().ok_or_else(|| {\n            ParakeetError::Io(std::io::Error::new(\n                std::io::ErrorKind::InvalidData,\n                \"No transcription result returned\",\n            ))\n        })?;\n\n        Ok(timestamped_result)\n    }\n}\n","sourceCodeStart":472,"sourceCodeEnd":499,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/parakeet_engine/model.rs#L472-L499","documentation":"ParakeetError::Io(InvalidData) raised in transcribe_samples when recognize_batch returns an empty Vec despite a batch of exactly one waveform. The TDT/RN-T greedy decode loop should always produce one TimestampedResult per batch item, so an empty result set means the encoder produced no timesteps (zero-length or degenerate input) or the batch/result bookkeeping diverged.","triggerScenarios":"Calling transcribe_samples with an empty samples Vec (samples_len == 0 gives Array2 zero columns and no timesteps to iterate), or a chunk so short/low-energy that the decode loop emits only blanks while the result collection drops the entry.","commonSituations":"VAD-gated pipelines feeding near-empty chunks to Parakeet, chunk-size bugs that pass 0 samples after resampling, mismatched/corrupted ONNX model + vocab files where preprocessing silently yields zero frames.","solutions":["Skip transcription for chunks below a minimum sample count (e.g. < 1600 samples = 100ms at 16kHz) before calling transcribe_samples","Log samples.len() when the error fires to confirm zero-length input is the cause","Return an empty TimestampedResult for silence instead of an error so VAD gaps are not fatal","If it persists with non-empty audio, re-download the Parakeet ONNX model and tokenizer/vocab to rule out corrupted artifacts"],"exampleFix":"// before\nlet r = engine.transcribe_samples(samples)?;\n\n// after\nif samples.len() < 1600 {\n    return Ok(TimestampedResult::default()); // silence: no tokens\n}\nlet r = engine.transcribe_samples(samples)?;","handlingStrategy":"validation","validationCode":"const MIN_SAMPLES: usize = 1600; // 100ms @ 16kHz\nif samples.len() < MIN_SAMPLES {\n    return Ok(TimestampedResult::default());\n}\nlet result = engine.transcribe_samples(samples)?;","typeGuard":null,"tryCatchPattern":"match engine.transcribe_samples(samples) {\n    Ok(r) => use(r),\n    Err(ParakeetError::Io(e)) if e.kind() == std::io::ErrorKind::InvalidData => {\n        log::warn!(\"empty parakeet result; treating chunk as silence\");\n        TimestampedResult::default()\n    }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Enforce a minimum chunk length at the VAD/pipeline boundary, not inside the engine","Log samples.len() alongside every transcribe call in debug builds","Verify ONNX model and vocab file checksums after download"],"tags":["rust","parakeet","speech-to-text","onnx","audio-chunk"],"backgroundTag":"empty-stt-inference-result","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}