A simple and powerful PulseAudio Remote API for Linux systems.
go-prapi is a backend implementation for pulse-remote written in Go. It provides a WebSocket-based API to control and gather information from PulseAudio devices and sinks.
- Works with Linux PulseAudio and PipeWire
- WebSocket communication for real-time updates
- Control volume, mute status, and audio outputs
- Retrieve information about audio cards and sinks
- Clone the repository
- Run the server:
- The server will start on
ws://localhost:8448/api/v1/ws
An actively developed frontend for this API is available at pr-web.
To use the frontend:
- Build the pr-web project
- Copy or symlink the build output to the
frontendfolder in this project
Example (if pr-web is in a sibling directory):
ln -s ../pr-web/dist frontendFor detailed API documentation, connect to the WebSocket endpoint and send a GetSchema action.
Check the Makefile for available commands:
make test: Run testsmake build: Build the applicationmake run/watch: Run with auto-reload on file changes
Use build it logger. You can set environmental variable DEBUG to filter out or show more logs.
By default it's set to "INFO" or "1".
All available options:
"TRACE"or"3""DEBUG"or"2""INFO"or"1""WARN"or"0""ERR"or"-1"
Example of logger in the code.
logger.Trace().Msg("from logger.Trace") logger.Debug().Msg("from logger.Debug") logger.Info().Msg("from logger.Info") logger.Warn().Msg("from logger.Warn") logger.Error().Msg("from logger.Error") logger.Fatal().Msg("from logger.Fatal") logger.Panic().Msg("from logger.Panic")
Few useful commands
@TODO (undg) 2025-02-17: clean doc
make install
make uninstall
systemctl --user start pulse-remote.service
systemctl --user set-environment DEBUG=trace # see available options in Debugging section
systemctl --user restart pulse-remote.service
systemctl --user unset-environment DEBUG
journalctl --user -u pulse-remote.service -f --output cat