Keep matched words that fall inside a missing-lyrics span #13

Merged
branderson merged 1 commits from missing-notes into main 2026-10-09 16:54:18 -07:00
Collaborator

Summary generated by LLM agent

Some charts had whole sung lines with no notes, each leaving an empty line break such as - 350, usually just before an "unmatched singing" marker in the review.

Cause

classify_lyrics_match builds each missing-lyrics span from the full, padded extent of every Whisper segment that contains any unmatched heard word. Segments often run several seconds and include matched lines too. build_notes then skipped every aligned word that started inside a span, which deleted lyrics that were heard and matched. The line breaks were still emitted, which produced the empty lines.

Skipping these words never did anything useful. Words from lines that were never heard are already removed through dropped_lines, so every skipped word belonged to a matched line.

Fix

build_notes no longer skips rows inside missing spans. The spans still produce the "missing lyrics near …" warning and the review marker. Words that align badly are still flagged low-confidence by their alignment score. This brings back the simpler loop from before the skip was added, without its bookkeeping for skipped rows.

Existing songs can be repaired without re-downloading: rebuild with Restart from set to notes.

Testing

  • The skip tests are replaced with one that checks matched words inside a missing span keep their notes, line break and warning.
  • Full suite passes, except for tests that need torch or an installed package, which my test environment doesn't have.
**Summary generated by LLM agent** Some charts had whole sung lines with no notes, each leaving an empty line break such as `- 350`, usually just before an "unmatched singing" marker in the review. ## Cause `classify_lyrics_match` builds each missing-lyrics span from the full, padded extent of every Whisper segment that contains any unmatched heard word. Segments often run several seconds and include matched lines too. `build_notes` then skipped every aligned word that started inside a span, which deleted lyrics that were heard and matched. The line breaks were still emitted, which produced the empty lines. Skipping these words never did anything useful. Words from lines that were never heard are already removed through `dropped_lines`, so every skipped word belonged to a matched line. ## Fix `build_notes` no longer skips rows inside missing spans. The spans still produce the "missing lyrics near …" warning and the review marker. Words that align badly are still flagged low-confidence by their alignment score. This brings back the simpler loop from before the skip was added, without its bookkeeping for skipped rows. Existing songs can be repaired without re-downloading: rebuild with **Restart from** set to `notes`. ## Testing - The skip tests are replaced with one that checks matched words inside a missing span keep their notes, line break and warning. - Full suite passes, except for tests that need torch or an installed package, which my test environment doesn't have.
dejima-agent added 1 commit 2026-10-09 16:52:35 -07:00
A missing span covers whole Whisper segments, so it often also holds lines
that were heard and matched. Skipping every aligned word starting inside one
dropped those lines' notes and left empty line breaks in the chart. Words
from lines never heard are already excluded via dropped_lines, so the span
now only drives the warning and the review marker.
branderson approved these changes 2026-10-09 16:54:13 -07:00
branderson merged commit 7a5696a306 into main 2026-10-09 16:54:18 -07:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: branderson/songtrace#13