DIY AirPlay Speaker with Raspberry Pi

AirPlay for music works really well, but is hampered by a frustrating lack of compatible accessories. In particular, I’m loathe to invest in speakers that have AirPlay built-in, in case I ever decide to switch to Spotify, which has its own incompatible Spotify Connect system.

The only official way to add AirPlay to traditional speakers is via the Airport Express, a fairly expensive solution. There are a few 3rd-party options out there as well, but since I just bought a Raspberry Pi, I decided to go the DIY route instead. Here’s a how-to guide on how to build your own.

Note: you’ll need some basic familiarity with the Terminal and a terminal-based text editor, but if you’re not comfortable there yet, this is a great project to start practicing those skills.

Required hardware

IMG_3240

Raspberry Pi & Power

I went for the latest 3rd generation Raspberry Pi, as it has built-in wifi and makes setup quite a bit simpler, but the 2nd gen model should also work just fine. It can be a bit picky about power supplies though, so make sure you pick something that delivers at least 2A continuously, like our tizi Tankstation line. And finally, you don’t really need the case, but it makes it feel much more like a real product, so get it if you plan on leaving it all hooked up for a long time.

Audio

The built-in audio jack on the Raspberry Pi sounds dreadful. I thought the reports might be overblown, but it sounds pretty distorted and crackly even to my non-audiophile ears. So the USB audio adapter is a must-have. The one I picked worked out of the box.

Software

You’ll need two bits of software:

There are a few audio specific OS alternatives out there, however at time of writing none of them worked with the latest Raspberry Pi. Do check out x and y though, if they’re supported on your Pi it’s probably the easier software stack to use.

Make sure you install Shairport-sync, not the original Shairport it’s based on, as that doesn’t support iOS 9 devices. You’ll have to download it directly, as it’s not in the default repo when I checked.

To install it, follow the instructions on the Github page and you’ll have it up and running in no time.

IMG_3239

Setup

I’d recommend you go in this order:

And that’s it: a fairly inexpensive AirPlay solution for any set of speakers. I’ve got mine connected to a set of Audioengine A2 and it works really well and sounds great.

Shopping List