Writing
Projects · March 2026 · 4 min read

SonoCast - streaming vinyl to Sonos via Icecast

I wanted to play vinyl through my Sonos. Sonos doesn't accept line-in from a USB sound card. So I built a two-container Docker stack that grabs the audio, encodes it, and streams it out as a custom radio station.

Oliver Bagley

Oliver Bagley

eCommerce Manager & Digital Systems

SonoCast - streaming vinyl to Sonos via Icecast

Sonos is a great system, but it doesn't accept arbitrary audio input. You can't just plug in a turntable and have it play. The app lists pre-approved sources. A USB sound card connected to a record player isn't one of them.

The workaround is to treat your audio input as a radio station and add that station to Sonos. Sonos will happily play a custom Icecast stream. So that's what I built.

How it works

SonoCast is a two-container Docker stack. The first container runs JACK and darkice, which captures audio from a USB sound card, encodes it as MP3, and streams it to an Icecast server running in the second container. Sonos then connects to that stream as if it were a radio station.

On top of that, there's a small web UI that shows the current stream status, detected silence (useful for knowing when a record side has ended), and USB device connection state. It also handles USB hotplug - if you disconnect and reconnect the sound card, the stream recovers automatically.

What I actually use it for

The setup is: turntable → USB audio interface → Raspberry Pi running SonoCast → Sonos. The Pi runs headless, SonoCast starts on boot, and the Sonos radio station points at it.

It works well enough that I've forgotten it's there, which is the goal. The latency is about 3–4 seconds, which is fine for background listening. For vinyl, it doesn't matter at all.

The repo is on GitHub with a compose file and setup instructions.

Work together

Got something to
work on?

If something here resonated, I'd like to hear from you.

More posts