Shazam has been identifying music for decades (1999). They started with a call in service, you phoned them, let it listen to the music and they sent you a text identifying the music. You paid for the phone call I think it was.
Now Shazam is all internet-ed up and it identifies a piece of music from a very few seconds of it, from anywhere in the piece.
Apple now own Shazam.
So for sure google can identify music if they choose to.