12 ms·
How does Shazam work? (2022)
- bartonsurfer1 3y agoHere is a beautifully produced video by Wall Street Journal that explains Shazam: https://www.wsj.com/video/series/in-depth-features/how-shazam-makes-unique-audio-fingerprints-to-identify-songs/9D7E86B7-73EF-4B92-8726-162E62B0EA3A https://www.wsj.com/video/series/in-depth-features/how-shaza... Chris (Shazam co-founder)
- Eiriksmal 3y agoWas the reason for the Shazam office in Rancho Bernardo, San Diego because you were originally from San Diego before moving to England? Lawn Love rented a suite above theirs from 2014-2018. The Shazam mobile app devs working out of that office were quiet and kept to themselves, even after the acquisition. We never heard any celebratory champagne!
- lstodd 3y agoEh, the memories. Once upon a time, back in Russia we had a service that captured most of FM radio stations and detected what was playing real-time as you listened from Moscow to some obscure station 2000 km away. Sadly it was all trampled by copyright idiots by about 2013. But the technology, the capture boxes which were SDRs before SDRs were a thing, hashes, station bosses calling in the night because DJs got too drunk and went rogue live.. oh the memories..
- JohnMakin 3y agosinbad comes out of a lamp and grants you 3 wishes
- pbj1968 3y agoOne of my greatest free joys in life is subjecting Shazam to the unpopular music I like and watching it be unable to identify it. (Screaming electro industrial for those that are curious)
- underlipton 3y agoMy hit rate for those 15-to-30-second snippets they play at the top of the hour on NPR is something like 10%. It's been getting worse and worse over the years.
- pbj1968 3y agoI used to do the same back when I commuted and when it DOES identify it, it tends to be some weird, weird stuff.
- drewmol 3y agoI'd sure like a Shazam for ads with mute capability, something I've been thinking about building for some time now just don't see any road to profitability and not getting adblock blocked.
- adhi01 3y agoTalk by the author in EuroPython 2016 on the same topic: https://youtu.be/LZ7THTB88AE?si=BQPgp-rxg32bTPMK https://youtu.be/LZ7THTB88AE?si=BQPgp-rxg32bTPMK
- financypants 3y agoI’m really interested in an implementation of this that adjusts for something like pitch. So it could tell when someone is mimicing a speaker, and could even grade them on how well they did. Or even a celebrity voice matcher that tells you which celebrity you sound most like. Does this exist?
- foobiekr 3y agoThe algorithm is interesting - at one time I was going to use https://theory.stanford.edu/~aiken/publications/papers/sigmod03.pdf https://theory.stanford.edu/~aiken/publications/papers/sigmo... to do a startup. This is different but very similar and contemporaneous.
- joshuahaglund 3y agoI'm curious to hear a constellation map played back. I imagine it'd be a bizarre robotic midi sorta representation of the original
- Exoristos 3y agoNot very well.
- Jean-Papoulos 3y agoWell well well, if it isn't our old friend the Fourier transform.
- logbiscuitswave 3y agoThis was a fascinating read, not only for understanding about how Shazam works which is something I’ve long been curious about, but also a great primer on digital signal processing.
- maxehmookau 3y agoThere used to be an open-source version of this called Echoprint which was shuttered after the company was bought by Spotify in 2012. Much the same technologies though and an interesting research project: https://www.echoprint.me/ https://www.echoprint.me/
- svilen_dobrev 3y agoanyone has an idea does shazam cope with time-axis not being linear/const? Think tapes, wow-and-flutter, speed-up-then-down-all-the-time.. AFAIK fingerprinting is highly time-sensitive (unless cut into ~50ms pieces.. and still not quite). Last time i looked, the general technique for that - Dynamic Time Warping ? - was prohibitely compute-expensive..
- forgotpwd16 3y agoWas in a live event few days ago and was wondering whether an attempt to recognizing live/noisy songs has been made. Shazam has failed me anytime I tried it for this.
- rvba 3y agoWhat are the legal aspects of building a service like this? New music is created every day. Can Shazam just buy MP3s at "normal prices" (non commercial) and use them commercially? Also if they buy music to encode its signature, wouldnt that be very big part of their running costs? What if someone makes a track and asks 100k USD for it? Will Shazam recognize it? I doubt they want to pay some ridiculous money just to recognize something. It's like those AI backups that seem to use books for training. Did they pay for those books?
- nyc111 3y agoI never used Shazam. What is its success rate? Does it guess or give options?
- kinj28 3y agoI always knew this had something to do with time domain to frequency domain. And I used question to interview engineers and see how creative would they think. Glad to see this post.
- alexpotato 3y agoMany years ago I was trying to build a "shot counter" to measure balls fired per second for a college paintball league. I ended up using sox + some Perl to be able to: - filter out only the frequency of the gun cycling - identify the peak amplitude to know when a shot started - use a sliding window of about 30ms to figure out when the shot ended - once the above was done, I could count how many shots per second and output it I even posted the code which you can see here: https://www.pbnation.com/showthread.php?t=3216349&highlight=linux https://www.pbnation.com/showthread.php?t=3216349&highlight=...
- vkaku 3y agoThank you for sharing. This is a great post that captures what a spectrogram does, and a must read for people who want to understand how audio fingerprinting works. There are similar approximate algorithms available for other media as well, so anyone who wishes to understand real world hashing should take their time to study this article.
- innagadadavida 3y agoThe normal spectrogram technique was already invented by Phillips prior to Shazam. What Shazam did was to hash things combinatorial to reduce false positives.
- ruuda 3y agoThere is also Chromaprint [1], which works slightly differently. It’s based on pitch change patterns instead of maxima in the spectrum. Chromaprint is used by AcoustID, which is a large open database that links audio fingerprints to MusicBrainz recordings. I find it astonishing how much music is in there despite having not nearly as much commercial backing as Shazam. [1]: https://oxygene.sk/2011/01/how-does-chromaprint-work/ https://oxygene.sk/2011/01/how-does-chromaprint-work/
- willseth 3y agoDoesn't Chromaprint have to compare the whole song? This is great for detecting duplicates, but Shazam's fingerprint design allows it to match a short snippet to the complete song.
- ruuda 3y agoI think it's possible to match on a subset in principe, but I don't know if/how this is implemented.
- ks2048 3y agoChromaprint computes “features” roughly 8 times per second. You can do a brute-force search checking different times in a song or potentially do some more fancy indexing once you have the features. (I did some experiments with Chromaprint - described here, https://kenschutte.com/phingerprint/ https://kenschutte.com/phingerprint/)
- willseth 3y agoCool experiment. I suspect your version would be far more permissive in matching than Shazam, which makes sense for your test case. Shazam's fingerprints are a lot more specific, e.g. they would differentiate different mixes of the same recording, potentially even different masters.
- hoherd 3y agoIf this interests you, then take a look at sCrAmBlEd?HaCkZ!, a music software project from 2006 that uses similar classifying techniques. https://youtu.be/eRlhKaxcKpA https://youtu.be/eRlhKaxcKpA
- mmaunder 3y agoThis was the smart approach when Shazam launched in 2008. I would have done exactly the same thing - gone straight to developing a method to turn every song into a hash as computationally efficiently as possible. If you launched this today the default R&D approach would be to train a model which may turn out to be far less efficient and more expensive to host. It feels like the kind of thing a model might be good at, but given that there are a finite number of songs, taking a hash-based approach is probably way more performant.
- AntonioCao 3y agotbh for tools like Shazam there's no fundamental difference between a database + hashing algorithm and a self-supervised model; both are great indexing & compression solutions, just for different scales of data.
- deleted 3y ago[deleted]
- mattl 3y ago2008? I remember using it in the UK in 2000/2001?
- wruza 3y agoWas it iphone or android?
- tomduncalf 3y agoIt was a phone number you called, which then SMSed you the result
- bloqs 3y agoIt was originally sms service
- aidenn0 3y agoPretty sure it launched in 2002 for 60p per song.
- dang 3y agoRelated. Others? How Shazam Works (2003 Paper) - https://news.ycombinator.com/item?id=33299853 https://news.ycombinator.com/item?id=33299853 - Oct 2022 (1 comment) Creating Shazam in Java (2010) - https://news.ycombinator.com/item?id=32530056 https://news.ycombinator.com/item?id=32530056 - Aug 2022 (36 comments) Shazam turns 20 - https://news.ycombinator.com/item?id=32520593 https://news.ycombinator.com/item?id=32520593 - Aug 2022 (227 comments) How Shazam Works (2015) - https://news.ycombinator.com/item?id=23806142 https://news.ycombinator.com/item?id=23806142 - July 2020 (7 comments) Designing an audio adblocker - https://news.ycombinator.com/item?id=18855029 https://news.ycombinator.com/item?id=18855029 - Jan 2019 (186 comments) Show HN: A radio/podcast adblocker featuring ML and Shazam-like fingerprinting - https://news.ycombinator.com/item?id=18459058 https://news.ycombinator.com/item?id=18459058 - Nov 2018 (2 comments) Show HN: Shazam-like acoustic fingerprinting of continuous audio streams - https://news.ycombinator.com/item?id=15809291 https://news.ycombinator.com/item?id=15809291 - Nov 2017 (76 comments) How Shazam Works (2015) - https://news.ycombinator.com/item?id=15350729 https://news.ycombinator.com/item?id=15350729 - Sept 2017 (13 comments) Tell HN: Shazam picks up song from my kitchen light - https://news.ycombinator.com/item?id=11593305 https://news.ycombinator.com/item?id=11593305 - April 2016 (2 comments) How Shazam works - https://news.ycombinator.com/item?id=9870408 https://news.ycombinator.com/item?id=9870408 - July 2015 (48 comments) Patent infringement claim re: “Creating Shazam in Java” blogpost (2010) - https://news.ycombinator.com/item?id=9594480 https://news.ycombinator.com/item?id=9594480 - May 2015 (18 comments) The Shazam Effect (2014) - https://news.ycombinator.com/item?id=9593429 https://news.ycombinator.com/item?id=9593429 - May 2015 (37 comments) The Shazam Effect - https://news.ycombinator.com/item?id=8634357 https://news.ycombinator.com/item?id=8634357 - Nov 2014 (34 comments) Ask HN: Is there an audio search technology that finds exact and similar audio? - https://news.ycombinator.com/item?id=8420141 https://news.ycombinator.com/item?id=8420141 - Oct 2014 (3 comments) Source code example of the Shazam algorithm - https://news.ycombinator.com/item?id=5724442 https://news.ycombinator.com/item?id=5724442 - May 2013 (16 comments) Creating Shazam in Java - https://news.ycombinator.com/item?id=5723863 https://news.ycombinator.com/item?id=5723863 - May 2013 (43 comments) An Industrial-Strength Audio Search Algorithm (Shazam) - https://news.ycombinator.com/item?id=2621103 https://news.ycombinator.com/item?id=2621103 - June 2011 (4 comments) Shazam's Search for Songs Creates New Music Jobs - https://news.ycombinator.com/item?id=2215295 https://news.ycombinator.com/item?id=2215295 - Feb 2011 (1 comment) How does the music-identifying app Shazam work its magic? - https://news.ycombinator.com/item?id=2214992 https://news.ycombinator.com/item?id=2214992 - Feb 2011 (2 comments) Implementing Shazam with Java in a weekend - https://news.ycombinator.com/item?id=1702975 https://news.ycombinator.com/item?id=1702975 - Sept 2010 (23 comments) Shazam: not magic after all - https://news.ycombinator.com/item?id=909263 https://news.ycombinator.com/item?id=909263 - Oct 2009 (28 comments) How does the music-identifying app Shazam work its magic? - https://news.ycombinator.com/item?id=893353 https://news.ycombinator.com/item?id=893353 - Oct 2009 (16 comments)
- hideo 3y agoWhy are there so few Shazam alternatives? Does it have something to do with licensing perhaps? The algorithm itself is fascinating but I don't get why this space seems to have just one player - i.e. Shazam
- jldugger 3y agoMy understanding is that there is a patent holder https://en.wikipedia.org/wiki/Shazam_(application)#Patent_infringement_lawsuit https://en.wikipedia.org/wiki/Shazam_(application)#Patent_in... in the US.
- willseth 3y agoThey have a patent, which IIRC should be expiring fairly soon (the original patent anyway)
- ronsor 3y agoI'm pretty sure it expired a few years ago now.
- Thaxll 3y agoI remember a while back 10 years? On HN someone did a poc ( code ) of Shazamn like and he was sued or asked to remove everything.
- forgotpwd16 3y agoBesides potential licese issues (that may not exist), legally creating the hashes database is a big effort as access to an near-all-encompassing song library is required.
- jdadj 3y agoSoundHound is a credible alternative.
- neop1x 3y agoI used to use SoundHound originally, but their Android app became so bloated that it took a long time to start it. As a result, I switched to Shazam and have not used SoundHound since.
- madrox 3y agoShazam is one of those rare products that hasn't stopped feeling magical in two decades. They're really the thing technologists aught to aspire to.
- gumballindie 3y agoOh technologists do. But what will product managers do if not constantly break the product to get a bonus and an extra holiday.
- wruza 3y agoAt the same time it turned from “tap to listen, here you go” to a sluggish af and ads-infested bloatware. I remember when I stopped using it and deleted the app because my prev-gen iphone couldn’t load it in time anyway.
- gniv 3y agoThese days you don't need the app. You can put it in the control center and just push the button to listen.
- jedrek 3y agoRight now it's integrated with siri so you just hold down your power button and say, "what is this song?" and it tells you.
- wodenokoto 3y agoWhat are you on about? There’s no ads in Shazam. You just open the app and it starts searching. No need for even tapping a button.
- jimmySixDOF 3y agoFor what it's worth there is a phenomenal site that applies algorithmic matching not to songs but to genera classification and the branching sub generas that new song signatures introduce. An amazing resource run as a solo sidehussle and looks like it is at risk of getting clipped due to hosting issues or something. There was Music DNA from Pandora and something similar on LastFM back a long time ago but this site is like the visual connectome of all human music produced through to 2023 and would be a loss for the World Wide Web if it stops..... Every Noise At Once https://everynoise.com https://everynoise.com
- bobsmooth 3y agoOh damn, looks the creator was part of Spotify's recent layoffs. He was a genre researcher while he was there.
- km3r 3y agoThe guy who helped create Wrapped too... sad.
- simonklitj 3y agoWhat a loss for Spotify.
- irrational 3y agoOkay, that is super impressive. Especially what it does when you search for an artist.
- dang 3y agoRelated: Every Noise at Once - https://news.ycombinator.com/item?id=26668426 https://news.ycombinator.com/item?id=26668426 - April 2021 (94 comments) Every Noise at Once - https://news.ycombinator.com/item?id=20585447 https://news.ycombinator.com/item?id=20585447 - Aug 2019 (82 comments) Every Noise at Once – an algorithmically-generated scatter-plot of musical genre - https://news.ycombinator.com/item?id=10269685 https://news.ycombinator.com/item?id=10269685 - Sept 2015 (23 comments) An algorithmically-generated scatter-plot of musical genres - with samples - https://news.ycombinator.com/item?id=9315499 https://news.ycombinator.com/item?id=9315499 - April 2015 (3 comments)
- seydor 3y agoShazam isn't great, so many tracks it can't identify or comes up with random electro-trance tracks. online services like a-ha are better
- snoopsnopp 3y agoI don’t want to be combative, but this has simply never worked for me. No matter what I do Shazam has produced incorrect results. I wonder if I’m the only one.
- xcv123 3y agoCould be poor sound quality from your phone microphone
- underlipton 3y agoIt's not just you. It's super hit-or-miss for me. Do you have an Android phone? I've read complaints that Shazam's accuracy dropped for them after Apple bought it.
- crazygringo 3y agoThat is very strange. Either you've got some kind of network bug or problem with your microphone, or you're looking up music so obscure it's not on Shazam. Or the music is just way too quiet, especially if there's a lot of other noise.
- yamazakiwi 3y agoNot necessarily all of your issue I'm sure but genre plays a large part in discovery. I find it has a hard time with less popular electronic and soundcloud type beats for instance.
- aftbit 3y agoThank you for releasing this as open source under MIT license. I wonder how well it works on human speech. I have a few thousand hours of recorded word content that I need to deduplicate. If I get around to it, I'll report back.
- aftbit 3y agoThis is a platform feature of Google assistant, I believe. I have a "search a song" on my Pixel, but not in airplane mode, so probably being done at the mothership.
- reqo 3y agoShazam is perhaps the most profitable music informatics technology of all time, yet it knows nothing about music at all! It’s basically just a fast hashing algorithm!
- 6stringmerc 3y agoIt's the reverse approach to similar engineering of what the Pop industry attempts to do to make genre based hits.
- crazygringo 3y agoI just want to say, it's remarkable how intuitive this is, and just how well it matches our own recognition process. It's more-or-less identifying melody fragments*, and then just trying to match those up in a sequence. The same way we'll recognize something after 5 or 7 or 10 notes. I'm pretty sure I've read about other methods for song fingerprinting that rely on things like loudness peaks, where it might work equally well, but that doesn't match how our own brains do it at all. It's pretty cool that this isn't relying on "artifacts" but basically works the same way we do. * Technically not always melody, but probably is most of the time
- totetsu 3y agoI remember I heard about this technique being developed by a guy from my NZ university years before there was ever a commercial product called Shazam. Maybe I eve heard and interview with him on the radio. But I’ve never heard of him again..
- totetsu 3y agoMaybe McNab, Rodger J. And Smith, Lloyd A. this from 2000 https://researchcommons.waikato.ac.nz/handle/10289/1293 https://researchcommons.waikato.ac.nz/handle/10289/1293 And from 1998 Melody based tune retrieval over the World Wide Web https://researchcommons.waikato.ac.nz/handle/10289/1062 https://researchcommons.waikato.ac.nz/handle/10289/1062