Skip to content

tim-we/wavestreamer

Repository files navigation

wavestreamer

Build for Raspberry Pi Go Version Node.js Version

wavestreamer is a lightweight music playback system written in Go, designed to run continuously on a Raspberry Pi.

It is the spiritual successor to py-radio, rewritten from scratch for better performance, maintainability, and flexibility.

A binary for AArch64 architecture (Raspberry Pi) is build by a GitHub Actions workflow.

Features

  • 🎵 Plays music from a local library (any format ffmpeg can handle)
  • 🔊 Dynamically adjusts volume to keep audio levels consistent (can be disabled)
  • 🌐 Optional web app to control playback (skip, pause, repeat, schedule)
  • 🕒 Plays hourly news (currently supports Tagesschau in 100 Sekunden)
  • 🧠 Simple, reliable, and built for 24/7 use on low-powered devices

Installation on a Raspberry Pi

We assume the 64bit version of Raspberry Pi OS. Setting up the service is optional, it just automatically starts the program after the Pi boots.

  1. For wavestreamer to run on a Raspberry Pi we need to install the following dependencies:

    sudo apt update
    sudo apt install libportaudio2 ffmpeg screen
  2. Copy files from pi-files

    • Copy start-radio.sh to the home folder (e.g. /home/pi)
    • Copy radio-service to /etc/systemd/system/radio.service and update the paths inside
  3. Setup service:

    • sudo systemctl daemon-reexec
    • sudo systemctl daemon-reload
    • sudo systemctl enable radio.service
    • sudo systemctl start radio.service

You can access the running program on the Pi with screen -R radio.

Development

Initial Setup

To build this program yourself you need go (check the version in go.mod) and node.js (check the version in webapp/package.json#engines.node). Besides the dependencies that are also required for the Pi you need to install

sudo apt install portaudio19-dev

After that:

  1. Check out this repo locally.
  2. Change into the webapp directory (cd webapp).
  3. Run npm install (this has to be done only once)
  4. Run npm run build (this has to done at least once and for every webapp change).

Now the webapp/dist folder should be populated with files. We are now ready to run the player.

Running / Building

You can start the program locally with

go run wavestreamer.go --help

About

A music player simulating a radio written in Go.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published