My wife picked up a Google Home unit so she could listen to music without constant obnoxious advertisements. I've been wanting to replace it because I don't want a spy device in my house. As I'd been fiddling with a Raspberry Pi audio player for some time, this finally prompted me to finish it.
So the Google Home will do more than play music, but that is 99% of what she used it for, so that's all I tried to replicate. I normally rip all media I buy, and have a fairly extensive music collection that was almost exclusively purchased as used CDs from second hand stores, like Goodwill. For $1 to $4 I can pick up anything that catches my attention. I also have quite a few comedy albums, a few audio books purchased on CD, and several radio plays from either the BBC or HPLHS.
All of the music is ripped to Ogg-FLAC format, with a .oga extension. All of the spoken word stuff is just plain Ogg-Vorbis, with the traditional .ogg extension. For those who don't know, .oga files are FLAC lossless audio in an Ogg container. The native FLAC container is fairly barebones, whereas the Ogg container has better support for extensive tagging and the bits needed to properly stream and seek. It makes for better streaming of audio whereas FLAC has a tendency to just download the entire file before playing.
Streaming audio with MPD doesn't take a lot of horsepower, and can easily be done with 1 Gb of RAM on even the minimalist RPi Zero. For my house I use RPi 3B+ board with HiFi Berry DAC+ add-on if I want to support analog speakers. That was my original plan, but have since switched to the Bose SoundTouch 10 wireless speaker for convenience. It can be used as a plain Jane BlueTooth speaker and doesn't need their app or anything other than "pair and go". It is Bose's "dumb" speaker, with no built-in Alexa or Google and can be had for under $100. If you want two, they will pair wirelessly for a stereo pair, but as I was replacing those little pod-style speakers, I went with just one.
That being said, if you're an audio snob, the HiFi Berry like of DACs will give you audiophile quality sound to your favorite pair of overpriced sound reproducing boxes.
There are several full-blown FOSS projects designed to turn an RPi into an audio jukebox, and I went thru three of the more popular before settling on my eventual choice. I tried Rune Audio and Volumio before settling on Moode Audio.
There are plenty of online reviews and comparisons of all three, so I won't repeat any of that here. If you're interested in doing this sort of project I suggest to check all three out. They support plugins for handing things like Apple's Air Play, Spotify, UPnP, DLNA, SMB, local touchscreens for the Pi, whole-house synchronized audio, and web interfaces. What clinched it for me was Moode is the only one to support BlueTooth as an output option. For me, fewer wires is a plus.
This brings me to the real point of my writing this journal entry -- documenting a few quirks to maybe help out some poor soul, or maybe my future self after I forget it all.
The big one is that the Pi's BCM43438 wireless LAN and Bluetooth Low Energy (BLE) chip REALLY doesn't like running both WiFi and BT at the same time. Streaming audio from a remote source thru WiFi and then playing on a BT speaker is just crap. Either by themselves is fine, but the chip interferes with itself even if you're doing WiFi in the 5 GHz spectrum, so it isn't a signal interference thing. Save yourself the headaches and disable on-board BlueTooth and just add one of those mini dongles. I use a ZEXMTE USB dongle, which costs around $10 and works out of the box with Linux, no custom drivers needed.
Now that I think of it, that was really the only major problem, but it was a doosey. Depending on how the on-board chip initializes it can either start and give you fits where things randomly freeze, or leave things in an odd state where systemd won't recognize the BT part.
I haven't had a chance to test on the Pi 4, which has an upgraded CYW43455 chip (now owned by Cypress Semi) that support 802.11ac and BT 4.2.
The only other quirk is that these programs rely on your IDv2 tags and honestly the most time I spent on the project -- other than debugging WiFi/BT issues -- was on ensuring my files were tagged correctly and consistently.
eol