Why you can trust ZDNET : ZDNET independently tests and researches products to bring you our best recommendations and advice. When you buy through our links, we may earn a commission. Our process

'ZDNET Recommends': What exactly does it mean?

ZDNET's recommendations are based on many hours of testing, research, and comparison shopping. We gather data from the best available sources, including vendor and retailer listings as well as other relevant and independent reviews sites. And we pore over customer reviews to find out what matters to real people who already own and use the products and services we’re assessing.

When you click through from our site to a retailer and buy a product or service, we may earn affiliate commissions. This helps support our work, but does not affect what we cover or how, and it does not affect the price you pay. Neither ZDNET nor the author are compensated for these independent reviews. Indeed, we follow strict guidelines that ensure our editorial content is never influenced by advertisers.

ZDNET's editorial team writes on behalf of you, our reader. Our goal is to deliver the most accurate information and the most knowledgeable advice possible in order to help you make smarter buying decisions on tech gear and a wide array of products and services. Our editors thoroughly review and fact-check every article to ensure that our content meets the highest standards. If we have made an error or published misleading information, we will correct or clarify the article. If you see inaccuracies in our content, please report the mistake via this form.


How to add song recognition to the Linux desktop

If Linux is your desktop operating system of choice, and you'd like to add song recognition software into the mix, SongRec has your back.
Written by Jack Wallen, Contributing Writer
three penguins in the water
elmvilla/Getty Images

I recently covered how to add song recognition to the MacOS menu bar (no Siri required), which helps keep you in the know as to whatever song is playing. This trick can come in very handy if you hear a tune and can't place the artist or title.

Now, guess what? You can do the same thing on Linux with SongRec. As you might expect, SongRec isn't quite as seamless as the MacOS option. However, given Apple bought Shazam and rolled it into the OS, this should come as no surprise. SongRec is a third-party piece of software -- and although it might not be as slick as the MacOS option, it still works very well.

Also: Thinking about switching to Linux? 9 things you need to know

Essentially, SongRec runs in the background, using your mic to recognize music that is playing. Once it recognizes a song, it will pop up a notification (that includes the artists and title). Click the notification and the SongRec window will open with the piece of music listed. You can then either click Search on YouTube to automatically bring up results for the song, or click Play a Shazam Lure (which, oddly enough, does nothing).

You can use SongRec to recognize music that's playing in the background or to recognize music from a local file. You can also disable notifications, which can be important. As long as the song continues playing (and SongRec is open), the program will keep popping up notifications, even after you've clicked it. That feature can be a bit annoying, especially if you're listening to a long track. 

Also: Want to save your aging computer? Try these 5 Linux distributions

SongRec also keeps a history of songs it's recognized. When you forget the song you heard earlier, you won't have to stress your memory. You can also add songs from your history to favorites and copy the artist, track name, or album to your OS clipboard.

Except in Arch Linux, you won't find SongRec in your distribution default repositories, so how do you install it? Let me show you.

How to install SongRec

What you'll need: The only things you'll need for this task is either a Ubuntu-based distribution, an Arch-based distribution, or a distribution that supports Flatpak. You'll also need a user with sudo privileges. 

Also: How to choose the right Linux desktop distribution for you

If you're using a desktop computer, you'll need to have an external microphone to use the app. With a laptop, as long as your mic works, you're good to go.

1. Install SongRec on an Ubuntu-based distribution

The first thing to do is open a terminal window. Once you've done that, you must run the following commands to install SongRec:

sudo apt-add-repository ppa:marin-m/songrec
sudo apt-get install songrec -y

2. Install SongRec on an Arch-based distribution

To install SongRec on an Arch-based distribution, open a terminal window and issue the following command:

sudo pacman -S songrec

3. Install SongRec using Flatpak

If you have a distribution that supports Flatpak, you can install SongRec with the following commands:

sudo apt install flatpak -y
flatpak remote-add https://flathub.org/repo/flathub.flatpakrepo --if-not-exists
flatpak install --user flathub com.github.marinm.songrec -y

After the Flatpak installation is complete, log out, and then log back in to add SongRec to your desktop menu.

Using SongRec

SongRec is very simple to use. All you have to do is open the app while a song is playing and wait for it to recognize the tune. The tool should automatically have your microphone enabled, so it will work out of the box. Once SongRec recognizes the music that's playing, you can either right click the listing in Recognition History (and then paste the results in whatever music streaming service you use), or click Search on YouTube to see results for the piece.

The SongRec app in action.

SongRec immediately recognized Mahler's Symphony No. 2, as well as the musicians involved.

Jack Wallen/ZDNET

One thing to keep in mind is that you'll need to manually close the SongRec app or the program will continue listening for music. There is also no system tray option, so the tool runs as a standard app. Once closed, the listening system shuts down and you're good to do. The next time you hear a tune you don't recognize, open SongRec and the app will help you out.

Congratulations, you've just added music recognition to your Linux desktop.

Editorial standards