Could you speak more on the Shazam style part? Don't you need a database of all ads to figure out if some snippet is an ad or not? That's how Shazam works for songs at least.
A native implementation I had thought of was running the audio through a STT LLM that then detects the ad timestamps then returns that to the UI to block.