# HushPupPi Pirate Radio Simple pirate radio interface (yes, actual FM radio) for Raspberry Pi with DJ-style queueing, station ID, RDS transmission, and a decent web interface. This is some code which was mostly hallucinated by Copilot. It did great with a lot of guidance, but don't expect miracles, and especially don't expect it to have great performance or security. ## Usage 1. Put radio.html and simple.css into your webroot—I used lighttpd. 2. Put music-api.py somewhere root can run it. I suggest `/usr/local/bin/` 3. The python script, music-api.py, will host a Flask daemon on port 5001. Set up your webserver to proxy requests to /api/ to localhost:5001. The python script calls [PiFmAdv](https://github.com/miegl/PiFmAdv), which you'll need to compile yourself. You should be able to figure out Python requirements from the `import` statements at the top of the file; they are pretty modest. Likewise, there are some constants towards the top which point to the location of music files, a cache location for album art, and for a SQLite database of indexed music. ## Autostart You can create a simple systemd service with the following: ``` [Unit] Description=Music API for FM transmitter After=network.target [Service] ExecStart=/usr/local/bin/music-api.py Restart=always [Install] WantedBy=multi-user.target ```