What does HackerNews think of snapcast?

Synchronous multiroom audio player

Language: C++

Some other setups already in the comments, but to chime in with my own:

I gave up on 3rd party things. My automation VM includes a GUI environment, and I run the official Linux Spotify client. The only way my setup can break is if Spotify gives on Linux entirely.

Snapcast[1] transmits two streams to 7 different speaker setups:

  * Music + text to speech
  * Just text to speech
When TTS plays on the first stream, music volume is ducked for the duration. That setup is all pulseaudio junk. I could actually play any system audio to my entire house, or even provide an 3.5mm aux input near the VM host, although in practice I stick to Spotify for convenience and the ability to use the clients on any machine to control everything.

Speakers in some rooms turn on/off completely with the room, while others stay on but toggle between music and text-to-speech, to make sure I hear those notices (which are like doors opening, washer is done, etc).

My main work setup has a snapcast client, so I hear TTS events even with noise canceling headphones on. Some snapcast clients are placed on existing machines (i.e. TV computer), while a few are dedicated Raspberry Pis.

[1] https://github.com/badaix/snapcast

There are some projects like Snapcast[1] or SoundSync[2] (disclaimer: I'm the creator of Soundsync) to let multiple devices communicate together on the same network. The transmission-side isn't that complex: you choose an audio codec, transmit chunks of data and add a synchronization layer (to keep multiple outputs in sync and to correctly delay video playback to match the soundtrack). The bigger problem is building an ecosystem big enough to make it attractive. Bluetooth sucks but is everywhere.

[1] https://github.com/badaix/snapcast [2] https://github.com/geekuillaume/soundsync

> weird quirks to deal with like the delay between the audio in and when you hear it, as well as it becoming desynced over time.

You may want to check out Snapcast. I use it to distribute audio to 6 clients on diverse hardware (several Raspberry Pis, a Windows PC, a Linux PC) and it handles synchronized playback very well, after tweaking the latency offsets for each device (once).

https://github.com/badaix/snapcast

(Edit: Ok, Snapcast doesn't get rid of the delay. But it does keep the players in sync, if you can tolerate some delay between source and speakers.)

Anyone looking to work around this by building their own multi-room speaker system should take a look at snapcast

https://github.com/badaix/snapcast

I've been wanting to do something like this for a while, but never got around to it. What I'd probably do is get a bunch of Raspberry Pis, buy HiFiBerry HATs for all of them, connect speakers, and install snapcast (https://github.com/badaix/snapcast).

But I'd still be afraid that it'd be fiddly and require too much maintenance. I really don't think there's anything commercial you can get that isn't kinda expensive, and almost certainly nothing that's open source / open hardware / open anything.

* Server running mopidy [1] with all your audio loaded up on it and connected to Spotify.

* Install the Iris plugin for UI [2] on server

* Install snapcast [3] server on the audio server and snapcast client on raspberry pi's near all stereos you want to pipe audio into

* Put bookmarks to the Iris page on all family member's phone home screens.

* Add the snapdroid app [4] to each phone so people can adjust volume of each stereo and also play audio on their phone (or anything it's bluetoothed into)

[1] https://mopidy.com/

[2] https://mopidy.com/ext/iris/

[3] https://github.com/badaix/snapcast

[4] https://github.com/badaix/snapdroid

I still pay for it... but only barely. It's a sad shadow of GPM, which was much more to my liking.

If you want to avoid their awful YTMusic web UI there are options. There's a decent, standalone, GUI YTM application for KDE [0] which I've used (sadly it doesn't support logins, but if you just want a player it works well enough).

There's also a plugin for Mopidy [1] that lets you listen through your MPD / snapcast [2] server, but that's more fiddly.

[0] https://apps.kde.org/audiotube/

[1] https://github.com/OzymandiasTheGreat/mopidy-ytmusic

[2] https://github.com/badaix/snapcast

NAS -> Plex -> Nest Audio (or other Google speakers) would achieve this. If your NAS doesn't support Plex, you could easily run it on a Raspberry Pi if it's just for music.

You'd have to look at alternatives for the media server (Plex) if you want to use a Homepod though .. I'm pretty sure Plex doesn't support AirPlay.

If it's just wireless audio you're after and not a "smart speaker" then there's some not-too-tricky ways to do this in the DIY space. snapcast for instance supports AirPlay and might integrate nicely into your current setup: https://github.com/badaix/snapcast

https://github.com/badaix/snapcast this seems really cool, although I haven't got around to doing it myself.
https://github.com/badaix/snapcast

Not simple enough for all consumers yet, but works flawlessly for me every day in my house.

You should also take a look at snapcast as an open Sonos alternative that can run on raspberry pi.

https://github.com/badaix/snapcast

As an open source alternative, one could use snapcast (https://github.com/badaix/snapcast) which works quite nicely and can be integrated in multiple ways.
I've built something similar at home with three RPis and Snapcast [0]. It has an integration with Librespot [1] that shows it as a Spotify destination. It works really well!

[0] https://github.com/badaix/snapcast [1] https://github.com/librespot-org/librespot

Network audio is pretty nifty! I run a Snapcast[0] setup at home, tied into Home Assistant[0] automation for multi-room audio. Some notes:

- I have six total audio zones, including my desktop computer.

- Audio for a room turns on/off with a room. It's neat to walk from my office into the kitchen, and have the kitchen lights come up and audio follow me in when the motion detectors fire. Some speakers don't mute when "off", but change source to a text-to-speech only channel (for i.e. door/window contact notification, other messages).

- Everything but my desktop (macOS) are speakers connected to a Raspberry Pi via USB DAC.

- One of my motivations here was multi-room audio, but a big one was to connect a Linux VM's audio output directly to the speakers so I could use the official Spotify client, instead of a 3rd-party library that will eventually break.

- Snapcast is really quite DIY for config, but I could set up other sources--an Airplay target, a line in target with a cable hanging off the server so people could plug in devices at a party, etc. I've seen setups online where people do this, and someone in a room can change that room's "channel" to another source.

- Spotify's DRM-as-feature is nice here, because I just use the Spotify client on my desktop normally, with output coming out elsewhere. I run 700ms of buffer, which is just low enough that clicking play/pause doesn't feel broken. I could probably drop it more, since everything is hardwired in the house.

- Previous to Snapcast, I just toggled Spotify's source when I walked between rooms, but there's quite a bit of dead air there, and it's a hassle to setup, plus multi-room audio sync is nice with people over.

[0] https://github.com/badaix/snapcast

[1] https://www.home-assistant.io/

I think you'll be surprised how quickly it drives you nuts (if there's ever the situation where you are hearing another speaker). There's also the rather brilliant https://github.com/badaix/snapcast if you do want sonos-like synchronised playback.
Snapcast would likely work better for this use case - it handles audio endpoint synchronization.

https://github.com/badaix/snapcast

Snapcast works like Sonos. Open source and runs on a raspberry pi (but probably best to run the server on something beefier). I put a Chromecast Audio on external USB line-in for compatibility with Spotify etc, and mopidy for local audio.

https://github.com/badaix/snapcast