Files
hpr-intro-stripper/tests
Lee Hanken 31fd921398 Fix a real correlation-robustness bug found chasing hpr0900's unmatched jingle
leading_match_seconds's gap-tolerance rule treated any two consecutive
borderline-low correlation windows as fatal, even with a long, clean,
sustained match starting immediately after them. Found directly:
comparing hpr0900's own audio across two different codecs (mp3 vs opus)
-- identical underlying content -- a minor codec-boundary artifact in
the first ~0.75s made the old rule report 0.25s for what a full
non-windowed cross-correlation confirmed was actually a 0.9979 overall
match at zero lag. Replaced with the same qualifying-run logic
last_high_correlation_run_seconds already used (factored out via
_qualifying_runs()), taking the first run instead of the last.

This is a real, general fix, but it does not explain hpr0900 itself:
re-tested against 17 candidates spanning the whole pre-2015 range with
the fix applied, still found nothing. The user confirmed by ear that
hpr0900's ~15-20s intro is a real, recognizable station jingle, so there
appears to be a second distinct jingle variant in circulation that
episode-number proximity doesn't predict and no tested sample shares --
documented as an open item (a vendored reference-variant library is the
likely right fix, not a wider search radius).

Also revisited the earlier librosa dismissal in Open Items: the bug just
found is specifically a hard-threshold brittleness problem, which is a
different and stronger reason to reconsider a continuous multi-feature
score than the original evaluation considered.

New test: test_leading_match.py, using the exact corrs pattern observed.
2026-11-22 14:24:17 +00:00
..