Zackriya-Solutions/meetily · error · ParakeetError

No transcription result returned

Error message

No transcription result returned

What it means

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.

Source

Thrown at frontend/src-tauri/src/parakeet_engine/model.rs:490

    pub fn transcribe_samples(
        &mut self,
        samples: Vec<f32>,
    ) -> Result<TimestampedResult, ParakeetError> {
        let batch_size = 1;
        let samples_len = samples.len();

        // Create waveforms array [batch_size, samples_len]
        let waveforms = Array2::from_shape_vec((batch_size, samples_len), samples)?.into_dyn();

        // Create waveforms_lens array [batch_size] with the actual length
        let waveforms_lens = Array1::from_vec(vec![samples_len as i64]).into_dyn();

        // Run recognition to get detailed results
        let results = self.recognize_batch(&waveforms.view(), &waveforms_lens.view())?;

        // Extract the first (and only) result
        let timestamped_result = results.into_iter().next().ok_or_else(|| {
            ParakeetError::Io(std::io::Error::new(
                std::io::ErrorKind::InvalidData,
                "No transcription result returned",
            ))
        })?;

        Ok(timestamped_result)
    }
}

View on GitHub (pinned to 0281737d87)

Solutions

  1. Skip transcription for chunks below a minimum sample count (e.g. < 1600 samples = 100ms at 16kHz) before calling transcribe_samples
  2. Log samples.len() when the error fires to confirm zero-length input is the cause
  3. Return an empty TimestampedResult for silence instead of an error so VAD gaps are not fatal
  4. If it persists with non-empty audio, re-download the Parakeet ONNX model and tokenizer/vocab to rule out corrupted artifacts

Example fix

// before
let r = engine.transcribe_samples(samples)?;

// after
if samples.len() < 1600 {
    return Ok(TimestampedResult::default()); // silence: no tokens
}
let r = engine.transcribe_samples(samples)?;
Defensive patterns

Strategy: validation

Validate before calling

const MIN_SAMPLES: usize = 1600; // 100ms @ 16kHz
if samples.len() < MIN_SAMPLES {
    return Ok(TimestampedResult::default());
}
let result = engine.transcribe_samples(samples)?;

Try / catch

match engine.transcribe_samples(samples) {
    Ok(r) => use(r),
    Err(ParakeetError::Io(e)) if e.kind() == std::io::ErrorKind::InvalidData => {
        log::warn!("empty parakeet result; treating chunk as silence");
        TimestampedResult::default()
    }
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


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