It must have happened to all of us: that darn song stuck in your head that keeps coming back, but you forgot what the song is and it’s just the humming stuck in your head.
Well, there’s an app for that now: it’s called Google.
A cure for your earworm
Google recently announced the hum-to-search feature for its mobile app, and it works pretty much as advertised: you hum, whistle, or (if you’re brave) sing a melody in the app for about 10 seconds and it tells you what the song is, along with a couple of other candidates. If you’re using Google Assistant, you can just say “Hey Google, what’s this song” and then hum the tune.
Google says the feature is available only in English on iPhone and 20 languages on Android, for now. But that seems to be the case just for the app itself — I used it to detect non-English songs successfully, despite my subpar humming skills.
The key element behind the app is a familiar one: machine learning. When you hum a melody, the machine learning model behind Google’s app transforms it into a number sequence, a digital version of your hum. It then looks through its catalog of millions of songs looking for something that fits. You can hum any part of the song, it doesn’t need to be the beginning or the chorus, everything works. You can even hum a part of the instrumental.
You also don’t need to have a good singing voice, the algorithm seems to do a good job anyway, although humming closer to the actual song definitely helps with ID-ing the song.
So does it actually work?
I tried it. To be honest, I played with the app a bit more than I’d care to admit. You know, for testing purposes, for science. Here’s how it worked for me.
First, I tried playing it a Youtube song and use it like Shazam. It worked, no hassle. I then tried humming songs that had “nanana” parts, like The Boxer, or Scooter’s Maria, and that also worked. I moved on to a bunch of popular songs, and without fail, it identified them — even when I purposely hummed a bit out of tune. I then tried to move to niche and non-English songs and here too, it performed admirably, although it wasn’t able to identify all songs. As far as I can tell, rap seems to be its weak point, perhaps because there are fewer distinguishable musical elements.
To sum it up, it seems to work well. It’s not a big deal in any real way, but it’s a feature that we all wanted at some moment and, well, here it is. It’s pretty fun when technology actually delivers, isn’t it?
Andrei's background is in geophysics, and he's been fascinated by it ever since he was a child. Feeling that there is a gap between scientists and the general audience, he started ZME Science -- and the results are what you see today.