It also uses a cloud fingerprint database apparently according to the second paragraph:
If you turn on "Show search button on lock screen", each time you tap to search Google receives a short, digital audio fingerprint to identify what's playing.
It also uses a cloud fingerprint database apparently according to the second paragraph: