Shazam is an app that identifies multimedia. The program stores a catalogue of audio fingerprints in a database. Shazam works by analyzing the captured sound and seeking a match based on an acoustic fingerprint in a database of millions of songs. It generates a spectrogram (a time/frequency 2D graph of the sound, with amplitude at intersections) of the sound, and maps out the frequency peaks from it (which should match key points of the harmonics of voice or of certain instruments).
Shazam can identify music, movies, advertising, and television shows, based on a short sample played either through the microphone of the device and also when you’re listening through your headphones. Unfortunately it’s proprietary software. As the software is developed by Apple it isn’t available for Linux. However, this doesn’t stop enterprising open source developers from making their own creations.
Music Radar is an open source music recognition program that provides a similar function to Shazam. It’s written in C++.
To build the software, you’ll need the Qt SDK (a cross-platform application framework) installed on your system.
Alternatively you can install the software using the developer’s snap with the command:
$ snap install music-radar
While snaps avoids issues that affect Linux systems, the installation files are larger than regular Ubuntu packages and use more hard disk space. This is because each application that needs a particular library installs its own copy.