Repository navigation
fix: normalise every input, keep checkpoints after a cut write, rewrite a lost VTT from JSON - #82
Merged
Merged
Conversation
…te a lost VTT from JSON Closes #77
# Conflicts: # transcript_combobulator/pipeline.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Three fixes from the review in #77:
convert_to_wav, so a 16 kHz mono WAV is peak-normalised like any other container. The copy path andneeds_conversionare gone.inferencerecord names only the transcription JSON. A deleted VTT now fails only thevttstage 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=1or a source change, and an olderinferencerecord 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
mainand pass here:test_quiet_16k_mono_wav_is_peak_normalised,test_missing_vtt_is_rewritten_from_json_without_inference, and the resume step added totest_chunk_checkpoint_roundtrip_and_truncation.test_quiet_16k_mono_wav_is_peak_normalisedreplacestest_cache_miss_replaces_existing_normalized_audio, which tested the removed copy path.test_cache_miss_removes_existing_audio_before_conversionstill covers stale derived audio.Slow tests: 6 passed, 1 skipped.
test_segmented_transcriptionandtest_basic_transcriptioncould 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