Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: A Scala Implementation of the Chromaprint/AcoustID Audio Fingerprinter (github.com/mgdigital)
49 points by mgdigital on May 30, 2019 | hide | past | favorite | 14 comments



This has been my testbed project for learning Scala, I also learned a lot about audio analysis, signal processing, fourier transforms etc. There were already Python bindings for the original C++ library but no easy way to use it on the JVM. I hope someone might find it useful/interesting. All feedback welcome!


I personally consider one of the most advanced and useful languages around. Good performance, insanely expressive, along with all the benefits of the JVM.

There’s very few projects in which Scala wouldn’t be a good choice.


What made you to pick Chromaprint? Also why did you pick Scala over lets say Kotlin?

I love the idea that you pick a project and re-implement it (or its bindings) into another language in order to learn it. That's how I usually do it, but never picked a very large project, usually I end up reimplementing some basic utils or config reader/reloader or something similar.


I had a few reasons for picking Chromaprint. I was interested in building a media player with Scala (still working on that on-and-off). I noticed that Python seemed to be a more popular language for this type of thing and was frustrated that some key libraries I wanted to use, particularly this one, are available for Python but not on the JVM. The more I looked into Chromaprint the more it intrigued me; I wanted to understand how it works and in a way set the algorithm free as it's almost become a standard for audio identification. I found a few reimplementation attempts in other languages on GitHub but couldn't get any of them working, so I guess I saw it as a challenge, you could also call it a rabbit hole. Aside from that, I was looking for an excuse to use Scala in a project. Kotlin looks interesting too and I'll hopefully get the chance to work with it someday, I can see that it is probably easier to pick up and might be a better choice for a big team - but Scala seems more faithful to functional programming principles and I find the style more elegant.


All makes great sense. Well good job!


What motivated you to learn scala? Scala doesn't seem to get much attention nowadays.


I can answer it from my perspective.

Scala is a powerful language, so you can be succinct. It's static typed, so it is maintainable as the codebase grows.

However, Scala is complex and difficult to learn. But overcoming that hurdle is a one-time thing.

In my view, Scala shines for a small team with, at least, one scala expert. We can achieve a lot of things with speed, safety, and relatively smaller codebase (compared to when using golang or java).

To give a contrast example, if you hire a lot of developers and care about perfect code quality, then golang is more appropriate.


Just curious, why do you say golang is good if you care about code quality?


Golang is extremely simple. There aren't many choices in design. so it's easier to control quality.


It's funny you say that, I learned it because I believe it's in demand commercially, and is also a joy to work with. I perceive that companies using Scala would be on average better to work for (from a developer's point of view) than those using say NodeJS or PHP.


There’s a lot of scala teams around, especially in finance.


Thank you for this motivational work.


Shoved up against AcoustID, I was hoping Chromaprint was an open source image fingerprinting solution with AcoustID being the audio solution. Chromaprint makes me think of image/video type terms. Anyone have any insight on how it became the name of an audio processing package?


I agree it's a slightly quirky name. The "chroma" refers to chromatography. In order to create the finger"print", an image is first extracted from the audio. An image fingerprinter would probably use many of the same techniques (e.g. fourier transform).




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

Search: