Giter Club home page Giter Club logo

raspberry-pipewire-speaker's Introduction

raspberry-pipewire-speaker

Configuration files to make a modern bluetooth/spotify connect speaker using Pipewire out of a Raspberry pi.

Goal of this project

List the configuration steps I had to go through / files I needed to configure in order to make a Bluetooth sink / Spotify Connect receiver out of a raspberry pi (or in my case, a chinese Android box using a custom Armbian build).

Requirements I had:

  • Support Spotify connect (with a recent, maintained project)
  • Support Bluetooth audio as a sink (with low-enough latency for video playback, and optionally with more codecs than just SBC)
  • Use a modern audio backend. I started this project using raspotify (with alsa backend) and bluez-alsa. This allowed for bit-perfect output but I started to have erratic behaviour when switching audio streams (distorded audio, high bluetooth latency). That was often solved restarting components
  • Minimal maintenance required. Plug device and forget it.
  • Audio quality is a target, but I gladly trade bit-perfectness to stability with good-enough quality resampling. I wasn't able to find any difference in critical listening, and even less so in day-to-day casual listening.

Alsa was out (because too fragile when abused, and using dmix made bluetooth latency shoot up), and as Pipewire seems to be replacing PulseAudio it was making sense to investigate researching setting it up.

1. Install & configure Pipewire/Wireplumber

Tested using debian & ubuntu, installation steps are similar (//TODO add link, google is your friend). You need to install pipewire, pipewire-pulse & wireplumber

//TODO add instructions to override default resampling rate/quality in pipewire-pulse.conf

2. Build, install & configure librespot

It seems the most active Spotify Connect implementation, and supports pulseaudio backend (so it can talk to pipewire almost natively). Build & installation instructions are on the Librespot repo (//TODO add link). I use the v0.4.2 release as it was the last one using the 'old' api (and work on the 'new' api was a bit fresh at time of writing).

cargo build --release --no-default-features --features pulseaudio-backend

//TODO add link to systemd user configuration example

3. Configure Bluez

//TODO

To rename the default advertised Bluetooth device name bluetoothctl system-alias "Your great Raspberry speaker"

4. Enable user lingering + Auto tty login

So at boot time, user session is started and everything gets loaded //TODO

5. (Optional) Integrate with MQTT (so can be controlled through Home Assistant, for example)

//TODO

raspberry-pipewire-speaker's People

Contributors

amondit avatar

Stargazers

Yannick Koechlin avatar  avatar

Watchers

Yannick Koechlin avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.