Spotify Box
evanhailey.com
evanhailey.com
This is a super cool and gratifying way to deliver the internet-connected bit at low cost (at least for those with hardware inclination, and access to means of production). For those without, Sonos' Port product does a great job filling the same niche. Though at $450 its a ... multiple ... of the cost of the project presented here!
If these devices had some sort of digital output so we could attach our own DACs, it would be much nicer.
I've though since replaced most of them with Nest Audios, mostly for the WAF.
Not as interesting though. Not as fun
I'd love to have time to work on something similar. My targets would be different audio-quality wise, but it's a very nice project. Kudos to its maker.
On this point, can't you use some USB DAC ? I know nothing on this topic but there must be something that sits between "Raspberry Pi sound quality" and "multi thousands $ DAC".
The HiFiBerry amplifier I use is $50, has great software and enough power and top notch DACs from TI. On top of that it’s a hat, has a dedicated steel enclosure and everything is powered by a laptop brick.
It’s unbeatable at that price point IMHO.
For the Raspberry Pi, I needed something tidy, like this box. My father gave his HiFi system to me due to space constraints, but kept a nice set of speakers, so I needed something comparable in clarity, in absolute smallest and sturdiest package. HiFiBerry allows me to do that.
Moreover the software is co-developed with Bang & Olufsen, and it's extremely polished, like the hardware itself. My setup is pretty lean, but HiFiBerry can do some serious stuff like B&O self-tuning and custom DSP filters for sound shaping (for room, for taste, for fun).
My setup is as follows:
- Raspberry Pi 4/2GB.
- HiFiBerry AMP2 [https://www.hifiberry.com/shop/boards/hifiberry-amp2/]
- Steel case for Pi4 + AMP2 [https://www.hifiberry.com/shop/cases/steel-case-for-hifiberr...]
The result is a literal black box with power in and speakers out. I added a SanDisk Fit USB drive for local music storage. It can run spotifyd, AirPlay 2, direct BT, local files and more. It packs a decent punch, runs cool, can be used from anywhere (runs a webapp on a server, advertised with mDNS). If there's an update, it installs and reboots automatically.
Set & Forget, at its finest.
The web app is great for use in your house, the Spotify plugin is first class - it's supported as a target in your Spotify app, or you can browse straight from the webapp, which means even a guest on your wifi can easily pop on and help pick the music.
Personally I have a RPi4 with the DAC2 HD and a steel case which I’m very happy with.
I think you can run Volumio on these too, but I prefer the simpler HiFiBerry OS distribution. You get AirPlay 2, Spotify and many more ways to play music. All connected to your analog hi-if equipment.
https://elmwoodelectronics.ca/products/hifiberry-dac-rca?var...
For powered speakers you can get a DAC or you can use unpowered / passive speaker if you get a amp hat
Oh wait….
https://rateyourmusic.com for discovery.
Now I just use Spotify and don’t care. I don’t need the extra work in my life.
I dont see it solving discoverability yet, but it worked completely fine on my Android devices. It also does some automatic tagging of your music to generate dynamic playlists.
it is limited to plex pass subscribers for now though. i'd say it's worth trying a free trial at least.
i listen to djs, radio stations and other internet channels that mix the music i like into new and exciting compositions.
I am SCREAMING OUT for a service that was like the old Spotify radio.
Currently just going to gigs again and finding bands through bandcamp the organic way is what I'm doing.
Also, here is a script I wrote to download and extract a Bandcamp download link and import it with the beet CLI music library manager:
https://github.com/radiosilence/dotfiles/blob/master/.zsh.d/...
I then use Navidrome (modern Subsonic replacement) to serve it up:
The radio also generate different playlists over time, the tracks in a song's/artist's radio will change and not be a static 30-odd tracks forever.
It uses Spotify under the hood, similar to how the radio used to work.
I guess you just have musically eclectically challenged friends.
I found discovery excellent in Google but Spotify is horrible, it thinks I want to listen to Pop because I put a playlist of "top" or "charts" on while I work, when really I want rock/metal albums and can't discover them for the life of me.
Also, because it has basically ruined my music preferences, despite me telling it what I want to be recommended, it makes recommendations for "Dua Lipa" and "Doja Cat". Nothing against either of them, but not really what I was looking for.
I still pay for streaming due to the convenience of typing most songs and playing it instantly... but if I like something enough to click the heart button I'll often hop over to Bandcamp to see if I can pay the artist more than the $.0001 they get for the stream. Even dropping someone a dollar is literally 10,000 times more support.
But that $150 for Spotify is only a small fraction of my yearly music spend. With most of it going to concert tickets, merch at concerts and merch/downloads on Bandcamp to support the artists I like.
Spotify and Bandcamp are not mutually exclusive
Hear, hear for college radio! The local college radio station is one of my favorite places to listen. They've got great variety. Depending on when you tune in, you might hear 'indie', folk, metal, electronic, or something completely different.
For another, pure streaming means you're locked into the streaming service's player, having internet access, and having a device you can run a client on. Just having the audio files is vastly preferable to me.
When CDs were everywhere, getting them was easy and prices more competitive.
The last CD I wanted I had to order from Germany and the company really took far too much for the shipping. (€ 15)
Once it arrived in Norway (ECC, not EU) I had to pay taxes on top of it.
Media downloads from the artist is good in that I get to direct the money directly (or at least a direct as I can) to the artist (I guess most companies in that space take a cut)
But they are easy to forget, easy to delete etc.
CDs are harder to throw out accidently.
I have not lost a file in 10years. I have a NAS with backup to the cloud, nothing fancy just a single drive NAS with automatic rolling backups. Important files go to multiple clouds.
There does seem to be an increasing interest in physical mediums. Or perhaps that fad has faded already.
I know some of the younger guys at work have started collecting vinyl. For a short period, it seemed like cassettes were hip too. I have no idea if that ever got going.
* Obviously, not all of them, but i've purchased 'digital download' versions of albums from artists signed with UMG many times.
Spotify simplified my life in this regard so much, and the best is the random suggestions and music discovery. I won't be looking back
Netflix, Amazon prime and video services suck, and it's better indeed to download movies. Spotify is irreplaceable
Also Royal by 3LAU is pretty interesting.
I suppose one advantage is that if you walk far away from your stereo, you can loose bluetooth connection and drop audio, where this device has it's own WiFi connection and pulls Spotify audio directly, and is just manually controlled via your phone.
Worth noting streaming Spotify over Chromecast (like on a chromecast audio) is oddly enough limited to 256 kbps AAC. The TV chromecast devices support Spotify Connect, I guess because they boot the full app GUI.
- Your phone has to be connected the entire time
- Quality is flaky
- It has to stay in range
- You have to manually disconnect/reconnect it every time
- You can't take calls while playing music
- Only one person/phone can connect to the speaker at a time
- It drains battery
Having the speaker stream directly from the internet while having your phone (or multiple phones, or web browser, or voice etc.) acting as a remote is a game changer.
Fully agree with your other points. And they're enough on their own.
You could be hosting a party, for example, and want to leave the room to take a call without interrupting the music.
In practice, this is just a terrible speaker that can only ever play Spotify. It's a waste of energy and resources that you will throw away within a year.
It's fun, and it's an amazing learning exercise.
* Bluetooth offers limited range and uses more battery, and is usually interrupted if someone calls, but supports any application that can play sound.
* Spotify Connect is its own Spotify client and downloads the audio stream from Spotify which allows freedom to roam. But the implementation is indeed limited to Spotify and doesn't support niceties like volume normalization or nerdy details like crossfade (and perhaps not gapless playback)
Overview: https://cast.otter.jetzt/ Sources: https://github.com/Ottercast
There's also a version with a built-in class D amplifier and color display. On the software side it's neatly packaged with a web UI for configuration, as well as support for snapcast (multiroom), airplay and pulseaudio besides spotify.
I'm not affiliated with them, just very tempted to build one.
Here is a pic of their design: https://0x0.st/-wXP.png
You can ping CounterPillow in the quartz64 room on libera.chat if you want more info. They mentioned that they might be open to shipping boards to people.
There is a stereo mini jack audio output on the pi. Just use that and don't waste your money on audio woo.
(This is also a standing bet of $5000 to anyone who can pass an ABX in front of me to discern the difference between the two in headphones of their own choosing. You pay if you lose.)
There's "audio woo" where you spend $1000 for a USB to SPDIF adapter that literally does almost nothing, and spending $50-100 for a decent DAC that doesn't have an audible hiss.
Belkin has a dongle to turn Apple AirPlay 2 into 3.5mm or optical.
https://www.belkin.com/us/speakers-headphones/speakers/sound...
Granted its not as headless. a iDevice (or airplay compatible source) needs to be running.
I have analog stereos in a few rooms and the airport express provides a nice way for anyone in the house to cast music from whatever app they like. and with modern iOS you can even output to different zones for different apps.
The airport expresses are roughly $50 a pop, less if you are patient.
Spotify has also refused to integrate with HomePod. The options are either stream all audio output, download something like AirFoil to stream only a single app (inconvenient, not friendly for non-technical users), or switch to Apple Music.
Wish it was free, or better yet built into the OS, but it's a very useful piece of software.
Being in the ecosystem already, Apple Music just makes sense. Does Spotify even have an Apple Watch app yet that allows on-device downloads for running, the way Apple Music does?
This is the same process that iRobot does to connect their Roomba cleaners. Is it done over Bluetooth maybe?
- a special qr code format that informs an app about the wifi network/wifi password (and other setup info)
- an app scans your wifi networks and joins the one that starts with the device's prefix (not supported on iOS except via a special api[0])
- app requests bluetooth permission, connects to the bluetooth accessory, and from there it exchanges temporary wifi AP info or does the entire setup over BLE
0: https://developer.apple.com/library/archive/qa/qa1942/_index...
I see this trend continue: "Bring Your Own Client" from examples like this to pure software like the apollo reddit client or youtube client featured a few days ago.
Cool project! I might venture down here again in the future, is a great thing to write about.
Very cool project otherwise, love the end result.
Not sure if this helps, but I’m paying $75 per hour to do bits of what you’ve have done here.
Only reason I bring this up is because I recently did a similar project for my family. You can salvage basically any old x86 board (or brand new, Linux-running ARM chip for that matter) and install a couple Linux daemons that enables it to act as a hyper-thin (total memory footprint under 250mb) Spotify client.
Lord knows how viable it would be to run on embedded hardware, but the current state of the Rust-based Spotify infrastructure looks very well maintained. In it's current state, I'd say the outlook is very good.
Surely cast and airplay work with Spotify while delivering equal sound?
Either way, amazing work and looks fantastic in wood.
Both those solutions still require a spotify client somewhere to interact with the spotify api. The spotify client is still ultimately responsible for determining what to play, where to play from, and what stream URL then needs to be 'cast' to the device.
The box therefore running it's own client independently means you can still control it remotely, but it no longer hijacks control of all audio output on your mobile (or other) device.
spotifyd also implements the Spotify Connect protocol, which enables you to control it through the Spotify app (mobile, desktop, or web), while still retaining independent audio output for other apps on your devices.
For example, you can launch Spotify on a Google Home and control it from any device logged in to the same account, regardless of whether it understands the Cast protocol, is on the same network etc.
I suspect that once Spotify offers HomePod support, the situation might look somewhat similar for AirPlay (since being able to continue streaming with your phone out of battery etc. is possible on Apple Music on a HomePod already).
I kinda knew this since I think the feature you described is also available through Alexa/Echo, but I never really took the time to think about what was going on behind the scenes.
However, I'm still struggling to understand what is going on in your example.
When you control Spotify from your phone (volume++, next, new song, etc), how does Google Home know to do something?
When you tell Google Home "google play never gonna give you up", how does the Spotify app on your phone know how to reflect what's playing on the Spotify app?
Technically I can imagine that there is a shadow state of your Spotify instance sitting out in the cloud somewhere, but what are the mechanisms that make all this work together? Is this part of the "cast" protocol/architecture? Is this Spotify specific IP/tech that they can push on Google and Alexa to include on their IOT/smart services since they have the clout and pull?
Do you have any good links (not too technical, not too lite) on how this works?
Yes, thank you for phrasing it better.
I don't think what you said is 100% true. I have an old chromecast that is capable of playing Spotify without the "spotify client" (i assume you mean spodifyd).
From what I understand about chromecast is that it uses a "cast protocol" (?) and therefore doesn't require "clients" (xyzd) for each media service integration.
Unsure about airplay though.
I imagine the reason they chose to use this spotifyd approach might be
- There is no "cast client" or "airplay client" available
- Audio properties of the Spotifyd client are superior to the alternatives
- They only use spotify
- just because they wanted to
Yup, i understand the idea behind these clients and why they're superior to bluetooth.
That’s neat!
I've heard the DACs on the Chromecast audios are pretty good, so should be plenty hi-fidelity for most people's needs.