I’m going to interrupt you here. Getting an ACRCloud API key isn’t quick, but it’s free, so download my credentials instead.

shazam-on-linux is better than Shazam itself, if you are more on your computer than your phone (or don’t have a ‘smart’ one).

When I first tried to configure it, it didn’t work. I traced the cause to arecord in not recording anything. The fastest way I got it working was this:

# record current song being played using Also loop device
timeout 5 pacat -r -d alsa_output.pci-0000_00_1f.3.analog-stereo.monitor | sox -t raw -r 44.1k -c 2 -b 16 -e s - -t wav ${RECORD_FOLDER}/${RECORD_FILE} rate 44.1k > /dev/null 2>&1

It was last year when I did this. Wanted to get it working and I have no idea why that way was better.

After reinstalling the OS, I noticed that I couldn’t ‘shazam’ things. Since the readme links to a page, what talks on and on, about how you should create something something monitor/loopback devices, I thought I had created one on the old installation, but I was wrong. I gave up on that. What actually went wrong? I didn’t have sox installed.

Since this is the same computer, it works; but it not might work for ~you~ me (this is not a blog, this is a public wiki). So I found out, where I got the alsa_output.pci-0000_00_1f.3.analog-stereo.monitor from. Probably with pacmd list-sinks. Run this and append .monitor:

pacmd list-sinks | grep name:

243 Words

2020-05-12 00:00 0000