Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ooook I don't want to be that guy, but if you take a signal processing course in a university, you'd see that algorithms that Shazam probably uses aren't blackmagic. In UC Berkeley one of the projects we did in our Linear Algebra class was doing something like Shazam; the input was a 5 seconds of a random song tuned down so much that human hear can barely hear and white noise added. Then the problem is matching this record with the song and specify start and end time (e.g. 2:30 to 2:35). Shazam is probably much more complex than this (I don't use it) but if college freshmen can do this...


I worked in email marketing where at its core, we were just doing string replacement from database lookups. Now, we did those string replacements over 300 million times a day. As my boss said "Everything at scale is hard".


I only have a cursory knowledge of DSP, but it sounds like this was implemented by using the 5 second clip to build a matched filter kernel. This would require convolving the samples of the 5 second clip with the entire song to find out where it matches, which should work super well, but I think it would be really tough to scale this up to millions of songs. Is this how it was implemented?


Pedant baited.


Please don't be a jerk on HN, even if another comment seems a bit pedantic.

Separately: there was nothing wrong with gnulinux's comment. It was obviously posted for the pleasure of sharing information, and didn't put down either the GP or Shazam.


Why can't I delete comments in HN? If from the responses to my comment I learned that I add nothing to do conversation, I want to be able to delete my comments. Am I missing something?


For what it's worth, I think it's neat that you shared that the knowledge necessary to build a Shazam-like thing is something an undergraduate might do as a homework assignment. I had thought it would be a lot more complicated. :)


If you're interested, you can search Berkeley EE16A and if you're lucky you'll find the homework assignment (Berkeley's class materials are always open to public). It was like a Jupyter notebook and the "song" was I think random 5 seconds of Universal Declarations of Human Rights, or something like that. I'm writing this in case it helps your search, I'm at work so I don't have time to search it myself. I took this class a while ago and am alumni so my memory is fuzzy about the details of this assignment.


The course website for EE16A is https://inst.eecs.berkeley.edu/~ee16a/. Looks like an interesting course.


It's mostly pretty standard linear algebra (from matrix operations to vector spaces to eigenvalue/eigenvectors) and some circuit theory (KVL, KCL, op-amps, circuit design etc) and some signal processing (cross-correlation, OMP, Sparse OMP, least squares etc). All EE/CS students take this class in Berkeley, it is strongly recommended to be taken as freshman (unless you take Math 54 which is an equivalent course with no circuit theory). It is followed by EE16B which includes further topics in linear algebra (SVD!), circuits (transistors!) and signal processing (Fourier Series!), and CS70 which includes discrete mathematics and probability theory. This series is usually taken along with programming based classes CS 61A and CS 61B; and after finishing both of these series students start taking "upperdivision" classes.


I think you have a few minutes to delete comments, but as soon as someone replies to you that link goes away.

I think it's a good thing, because often there are good comments in response to downvoted comments. Letting people delete comments would make the discussion hard to follow.


You don't have to, the votes will gradually adjust comment visibility based on its perceived (de)merit. Besides, an unpopular comment doesn't mean it's incorrect, e.g. the content might be useful but the tone irritating.

It was informative to myself at least.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: