Go-based Spotify Connect client that appears as a network speaker in the Spotify app. Streams playback through ALSA, PulseAudio, macOS, Windows, or a pipe backend.
Overview
go-librespot is a Spotify Connect compatible client written in Go. It registers on your network so the Spotify app can treat it as a speaker and stream music to it. Spotify Premium is required for Connect playback.
Playback can use several audio backends, including ALSA and PulseAudio on Linux, AudioToolbox on macOS, WASAPI on Windows, or a raw named pipe for custom routing. The daemon supports loudness normalization to Spotify’s −14 LUFS target, configurable crossfade between tracks, podcast resume with progress synced to other devices, Spotify Jam hosting, and DJ X with synthesized narration. Volume can stay independent, sync with an ALSA mixer, or be fully external. Downloaded audio can be cached on disk within an LRU size limit.
You can sign in with Zeroconf discovery, interactive OAuth, device authorization at spotify.com/pair, or a Spotify access token. mDNS advertisement can use a built-in responder or the system Avahi daemon. Optional REST and WebSocket interfaces control and monitor playback. On Linux, MPRIS over D-Bus supports standard media keys; on macOS, Now Playing can show track art and respond to media keys when enabled.
Install prebuilt binaries, a container image, or Homebrew on macOS and Linux. Configuration lives under a user config directory with YAML settings for modes, backends, API server, and cache. The project ships as a single Go binary aimed at lightweight devices such as Raspberry Pi.
Key features
- Spotify Connect network speaker
- ALSA, PulseAudio, macOS, Windows, pipe backends
- −14 LUFS loudness normalization
- Configurable crossfade between tracks
- Podcast resume and progress sync
- Spotify Jam and DJ X support
- REST API and WebSocket events
- On-disk LRU audio cache
Use cases
- Headless speaker on embedded Linux
- Pipe audio into another receiver
- Control playback via REST or WebSocket
- Linux media keys through MPRIS
- Run in Docker with PulseAudio