A cross-platform headless audio player controlled via MQTT
(Written in ๐)
./audio-player config # Configure sound device (creates config.yaml)
./audio-player # Run with config.yaml (or use -c custom.yaml)
# Control via MQTT
mosquitto_pub -t "/player/audio_url" -m "http://example.com/sound.wav"
mosquitto_pub -t "/player/cmd/player" -m "start"
| Control | |
| Protocol | MQTT-based API โ full remote control, seamless integration with embedded systems, Node-RED, Home Assistant |
|---|---|
| Status Publishing | Player state, position, volume, loop/repeat status, audio level โ all published in real-time |
| Health Heartbeat | Configurable heartbeat for monitoring player health in production |
| Audio Output | |
| Channel Routing | Live-switchable โ route to any channels (2, 4, 8, 16+), change mid-playback without interruption |
| Audio Level | Real-time RMS for reactive visuals/LEDs. Configurable update rate. Can be disabled via config. |
| Volume | 0โ200% range, real-time control via MQTT |
| File Loading | |
| Remote URLs | HTTP/HTTPS โ load audio directly from web, no pre-staging needed |
| Local Paths | Absolute file paths also supported |
| Hot-Swap | Background download โ current audio continues while new file loads |
| Auto-Start | Configurable: auto-play on new file, or wait for explicit command |
| Playback | |
| Loop | Continuous playback until stopped |
| Repeat | Play N times (1โ10) with intervals (0โ30s). Sticky across file changes. |
| Seek | Jump to any position (MM:SS or seconds) |
| Pause / Resume | Full transport control. New file with auto-start resumes immediately. |
| Deployment | |
| Platforms | macOS, Linux, Windows (Intel, AMD, Apple Silicon) |
| Multi-Instance | Multiple players per machine, same or different audio devices |