Skip to content

fix: normalise every input, keep checkpoints after a cut write, rewrite a lost VTT from JSON - #82

Merged
thatsrue merged 2 commits into
mainfrom
fix/review-77
Oct 31, 2026
Merged

thatsrue merged 2 commits into
mainfrom
fix/review-77

Conversation

@thatsrue

Copy link
Copy Markdown
Collaborator

What changed

Three fixes from the review in #77:

  • Every input goes through convert_to_wav, so a 16 kHz mono WAV is peak-normalised like any other container. The copy path and needs_conversion are gone.
  • Opening a progress file cuts an unfinished last line, so the next run's chunks start on their own line instead of being glued onto the fragment.
  • The inference record names only the transcription JSON. A deleted VTT now fails only the vtt stage and is rewritten from the JSON, with no inference.

After updating: the cache version is not bumped, so finished sessions are not re-transcribed. Records written before this keep their old contents: a 16 kHz mono WAV that was already converted keeps its unnormalised copy until force=1 or a source change, and an older inference record still lists the VTT, so deleting that VTT re-infers once more.

Why

The same track gave VAD and whisper different audio depending only on its container. A second kill mid-run lost every chunk the previous run had checkpointed. Deleting a VTT redid hours of inference that the code comment promised to skip.

Closes #77

How you checked it

  • make lint, make typecheck, make test-fast: exit 0, 297 passed.

  • The three new tests fail on main and pass here: test_quiet_16k_mono_wav_is_peak_normalised, test_missing_vtt_is_rewritten_from_json_without_inference, and the resume step added to test_chunk_checkpoint_roundtrip_and_truncation.

  • test_quiet_16k_mono_wav_is_peak_normalised replaces test_cache_miss_replaces_existing_normalized_audio, which tested the removed copy path. test_cache_miss_removes_existing_audio_before_conversion still covers stale derived audio.

  • Slow tests: 6 passed, 1 skipped. test_segmented_transcription and test_basic_transcription could not run because there is no whisper model in this checkout.

  • A bug fix comes with a test that fails without it

  • Docs match how it works now

  • No secrets or private information

@thatsrue
thatsrue merged commit 5fc5147 into main Oct 31, 2026
4 checks passed
@thatsrue
thatsrue deleted the fix/review-77 branch October 31, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Low-severity bugs from the 2026-10-30 code review

1 participant