Raw PCM cross-correlation fails on different masters/mixes (all candidates
have near-identical confidence). Chromaprint generates perceptual hashes
that are invariant to mastering, so the correct offset is always in the
top 2 candidates with clear separation. Still generates comparison WAVs
for ear verification since repetitive songs can have ambiguous top picks.
Requires fpcalc (chromaprint) on PATH in addition to ffmpeg.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace direct HTML5 Audio usage with an AudioPlayer abstraction that
supports both local audio files and YouTube IFrame Player API. Songs
can now specify a youtubeVideoId and youtubeOffset to stream audio
from YouTube instead of hosting audio files.
- AudioPlayer interface with LocalAudioPlayer and YouTubeAudioPlayer
- YouTube IFrame API type declarations and script loader
- Cross-correlation offset detection tool (tools/audio-offset/)
- Get Lucky configured with YouTube video 5NV6Rdv1a3I, offset 66.389s
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>