About this project

librespot is an open-source client library for Spotify, serving as an alternative to the official, deprecated closed-source libspotify. It enables applications to control and play music through various audio backends (such as Rodio, ALSA, GStreamer, PortAudio, PulseAudio, JACK, and SDL) and allows devices to act as a Spotify Connect receiver. Note that librespot requires a Spotify Premium account and does not support free tier features like limited skips or advertisements. The project provides a command-line interface (CLI) tool for headless Spotify Connect playback and can be installed via Cargo (`cargo install librespot`) or official package managers on Linux, FreeBSD, and NetBSD. Developers can integrate the library into custom applications or build it with various audio, TLS, and discovery backends. The project is maintained by the librespot-org community and is licensed under the MIT license. It is also used by various related projects, such as Spotifyd (a stripped-down daemon), Snapcast (multi-room audio), and RoPieee (network audio streaming).