You can Turn a Raspberry Pi into a Bluetooth Smart Speaker to Stream music via Bluetooth, Spotify Connect, and AirPlay

Purple colour background showing a black Raspberry Pi case with the raspberry symbol on the front. There are blue concentric circles appearing to radiate out from the device. On each side is a blue coloured Bluetooth logo.

The author mentions using a Balena Cloud account but I see there is also an openBalena option which is open source.

From Balena’s website: “With openBalena, we want to give developers the ability to manage fleets of devices on their own. One of our primary motivations in releasing openBalena is to mitigate fears of lock-in and remove barriers to exit (and entry!). We also hope to encourage contributions to the codebase so that users can fix issues and add features themselves. We will continue evolving openBalena in lockstep with balenaCloud, with much of our development process taking place in the open, so that together we can keep improving both the open source project and the hosted service.”

So, it is probably worth trying this out with openBalena, actually.

See https://www.howtogeek.com/how-i-turned-a-raspberry-pi-into-a-bluetooth-smart-speaker/