#778·meetily

fix(retranscription): preserve existing transcript when ASR returns no usable text

Author: safvanatzackCreated Sep 7, 2026Updated Sep 7, 2026
Labelsbugbackend

Problem

Retranscription validates that VAD returned at least one segment, but it does not validate that ASR produced at least one usable transcript before destructive replacement.

If every processable segment returns empty or whitespace text, all_transcripts remains empty. The code then deletes all existing transcript rows, performs zero replacement inserts, commits the transaction, writes an empty sidecar, and emits successful completion.

User impact

A model miss can remove a meeting's existing transcript while the UI reports Retranscription complete! 0 segments created. The source audio remains available, but recovery requires rerunning transcription and the previous transcript is no longer preserved.

Reachability and evidence

Whisper can legitimately return an empty successful result after output cleanup, and Parakeet can return an empty model result. Individual empty segments are therefore expected, but an all-empty replacement must not be treated as success.

  • Empty-result handling: frontend/src-tauri/src/audio/retranscription.rs:365-413
  • Empty segment conversion: frontend/src-tauri/src/audio/retranscription.rs:420-423
  • Delete and zero-insert commit: frontend/src-tauri/src/audio/retranscription.rs:430-461
  • Successful completion: frontend/src-tauri/src/audio/retranscription.rs:492-499
  • Completion UI: frontend/src/components/MeetingDetails/RetranscribeDialog.tsx:145-160

This behavior predates PR #679 and is unrelated to PR #771's timestamp correction.

Acceptance criteria

  1. After ASR processing and before opening the replacement transaction, an entirely empty usable result returns a caller-visible No transcribable speech error.
  2. Existing transcript rows and transcripts.json remain untouched in that case.
  3. Individual empty or false-positive VAD segments remain skippable when other usable segments exist.
  4. The frontend receives retranscription-error, not retranscription-complete.
  5. Intentional transcript clearing, if supported, remains a separate explicit operation.
  6. Regression coverage begins with existing rows, supplies nonzero VAD output plus all-empty ASR results, and proves the rows survive.

References

Source: Zackriya-Solutions/meetily