Zackriya-Solutions/meetily · info · anyhow::Error
Retranscription cancelled
Error message
Retranscription cancelled
What it means
Cooperative cancellation checkpoint: before the CPU-heavy decode stage, run_retranscription checks the RETRANSCRIPTION_CANCELLED AtomicBool and bails out if the user cancelled. The flag is set only by cancel_retranscription and reset at job start, so this error always reflects an intentional cancel, not a malfunction.
Source
Thrown at frontend/src-tauri/src/audio/retranscription.rs:196
provider: Option<String>,
) -> Result<RetranscriptionResult> {
let folder_path = PathBuf::from(&meeting_folder_path);
let audio_path = find_audio_file(&folder_path)?;
// Determine which provider to use (default to whisper)
let use_parakeet = provider.as_deref() == Some("parakeet");
info!(
"Starting retranscription for meeting {} with language {:?}, model {:?}, provider {:?}",
meeting_id, language, model, provider
);
// Emit progress: decoding
emit_progress(&app, &meeting_id, "decoding", 5, "Decoding audio file...");
// Check for cancellation
if RETRANSCRIPTION_CANCELLED.load(Ordering::SeqCst) {
return Err(anyhow!("Retranscription cancelled"));
}
// Decode the audio file (CPU-intensive, run in blocking task)
let path_for_decode = audio_path.clone();
let decoded = tokio::task::spawn_blocking(move || {
decode_audio_file(&path_for_decode)
})
.await
.map_err(|e| anyhow!("Decode task panicked: {}", e))??;
let duration_seconds = decoded.duration_seconds;
info!(
"Decoded audio: {:.2}s, {}Hz, {} channels",
duration_seconds, decoded.sample_rate, decoded.channels
);
emit_progress(&app, &meeting_id, "decoding", 15, "Converting audio format...");
View on GitHub (pinned to 0281737d87)
Solutions
- Treat this as expected control flow: show 'Cancelled' in the UI, not an error
- Restart the retranscription if the cancellation was accidental
- Emit a terminal cancelled progress event so the UI resets its state cleanly
Example fix
// before
let result = run_retranscription(app, meeting_id, folder, lang, model, provider).await?;
// after - branch on cancellation so it is not surfaced as a failure
match run_retranscription(app, meeting_id, folder, lang, model, provider).await {
Ok(result) => Ok(result),
Err(e) if e.to_string().contains("cancelled") => {
emit_progress(&app, &meeting_id, "cancelled", 0, "Cancelled by user");
Err(e)
}
Err(e) => Err(e),
} Defensive patterns
Strategy: try-catch
Try / catch
In the retranscription result handler, branch on the error message: 'Retranscription cancelled' maps to a neutral 'Cancelled' UI state (no error toast, reset progress), all other errors map to failure with retry option.
Prevention
- Model cancellation as a distinct result state, not an error, in UI state machines
- Reset RETRANSCRIPTION_CANCELLED only via start_retranscription so flags stay coherent
- Emit a terminal 'cancelled' progress event so listeners can clean up
When it happens
Trigger: User clicks Cancel (cancel_retranscription_command) while a retranscription job is between the 'decoding' progress emission and the spawn_blocking decode call.
Common situations: Cancelling a long retranscription of a long meeting because the wrong meeting, language, or model was chosen.
Related errors
- VAD processing cancelled
- Import cancelled
- Retranscription already in progress
- No audio file found in: {}
- No speech detected in audio file
AI-assisted analysis of Zackriya-Solutions/meetily@0281737d87 (2026-08-16).
Data as JSON: /api/errors/b2c2c13eed53f71f.
Report an issue: GitHub.