The room audio becomes a moving clock.
Like glancing at a station clock, the phone learns both which program is playing and where it is now.
ShazamKit matches a fingerprint of the microphone audio to a custom reference signature and returns an updated offset into that recording.