A cross-platform System Tray app for Windows, macOS, and Linux that monitors your speaker/headphone volume and protects your hearing.
SoundBrake sits silently in your system tray, watching your output volume in real time. When you've been listening too loud for too long, it sends a native desktop notification — and at critical levels it automatically lowers the volume to protect your hearing.
Pre-built installers are available on the Releases page:
| Platform | File |
|---|---|
| Windows | SoundBrake-Setup-x.x.x.exe (Inno Setup installer) |
| macOS | SoundBrake-x.x.x.dmg (disk image) |
| Linux | soundbrake_x.x.x_amd64.deb / soundbrake-x.x.x-1.x86_64.rpm |
Want to build from source? Continue reading.
Windows SmartScreen warning: Because SoundBrake is not yet code-signed, Windows may show an "Unknown publisher" dialog when you run the installer. Click "More info" → "Run anyway" to proceed. If you prefer not to do that, you can build from source with
go buildand verify the code yourself.
- Requirements
- Project Structure
- Building & Running
- Windows Installer (Inno Setup)
- macOS .dmg Package
- Linux .deb / .rpm Package
- Code Signing
- How It Works
- Contributing
| Tool | Version | Purpose |
|---|---|---|
| Go | 1.21+ | Compilation |
| Inno Setup | 6.x | Windows installer |
| create-dmg | latest | macOS disk image |
| fpm | latest | Linux deb/rpm packaging |
| goversioninfo | latest | Embed icon + version info into Windows EXE |
| osslsigncode / signtool | Code signing |
# goversioninfo (auto-installed by build.bat, or manually:)
go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest
# macOS
brew install create-dmg
# Linux (fpm)
sudo gem install fpmsoundbrake/
main.go
go.mod
versioninfo.json # Windows EXE metadata (icon, version)
assets/
icon.ico # Windows multi-size icon (auto-generated)
wizard_banner.bmp # Inno Setup wizard banner (auto-generated)
wizard_small.bmp # Inno Setup small image (auto-generated)
icon.png # General PNG icon (auto-generated)
app.manifest # Windows UAC manifest
internal/
audio/ # Platform-specific volume control
icon/ # Runtime icon renderer (PNG for tray)
monitor/ # Core monitoring state machine
notification/ # Platform-specific notifications
startup/ # Launch-on-login registration
tray/ # System Tray UI
types/ # Shared type definitions
setup/
windows/
soundbrake.iss # Inno Setup script
build.bat # One-click build + package
macos/
build.sh # .app + .dmg builder
entitlements.plist
linux/
package.sh # .deb + .rpm builder
go mod tidygo run .# Quick build
setup\windows\build.bat
# Or manually
GOOS=windows GOARCH=amd64 go build -ldflags="-s -w -H windowsgui" -o soundbrake.exe ../setup/macos/build.sh./setup/linux/package.sh- Download and install Inno Setup 6.
- Run
setup\windows\build.bat. The script will:- Generate
assets/icon.ico, wizard images, andresource.syso(embeds icon + version into EXE), - Compile the Go binary,
- Produce
setup\windows\Output\SoundBrake-Setup-1.0.0.exewith a 12-language wizard.
- Generate
| Feature | Detail |
|---|---|
| Install directory | %ProgramFiles%\SoundBrake (admin) or %LocalAppData%\SoundBrake (user) |
| Start Menu | SoundBrake shortcut with icon |
| Desktop shortcut | Optional (checkbox during install) |
| Control Panel | Appears in Programs list; standard uninstall works |
| Startup entry | Optional (checkbox during install); app can also toggle this itself |
| Uninstall | Running process is killed via taskkill, registry key is removed |
The installer wizard supports 12 languages: English, Turkish, German, French, Spanish, Italian, Russian, Portuguese, Dutch, Polish, Japanese, Korean.
The application UI supports an additional 13th language — Chinese (Simplified) — detected automatically via the LANG environment variable on macOS/Linux or by setting HKCU\Software\SoundBrake\Language = chinese on Windows.
brew install create-dmg
# Build with a Developer ID certificate
SIGNING_ID="Developer ID Application: Your Name (TEAMID)" \
./setup/macos/build.shOutput: setup/macos/SoundBrake-1.0.0.dmg
# Submit to Apple
xcrun notarytool submit setup/macos/SoundBrake-1.0.0.dmg \
--apple-id "you@example.com" \
--team-id "YOURTEAMID" \
--password "app-specific-password" \
--wait
# Staple the ticket after approval
xcrun stapler staple setup/macos/SoundBrake-1.0.0.dmgsudo gem install fpm
./setup/linux/package.shOutput:
setup/linux/soundbrake_1.0.0_amd64.debsetup/linux/soundbrake-1.0.0-1.x86_64.rpm
sudo dpkg -i soundbrake_1.0.0_amd64.deb # Debian / Ubuntu
sudo rpm -i soundbrake-1.0.0-1.x86_64.rpm # Fedora / RHEL
# Remove
sudo apt remove soundbrake # Debian
sudo rpm -e soundbrake # FedoraThe build script uses signtool (from the Windows SDK) if a certificate is available. To sign the EXE and installer manually:
signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256 ^
/f "MyCert.pfx" /p "password" soundbrake.exe
signtool sign /fd sha256 /tr http://timestamp.digicert.com /td sha256 ^
/f "MyCert.pfx" /p "password" setup\windows\Output\SoundBrake-Setup-1.0.0.exeSigning and notarization are handled inside setup/macos/build.sh. Set the SIGNING_ID environment variable before running:
SIGNING_ID="Developer ID Application: Your Name (TEAMID)" ./setup/macos/build.shAfter the build, submit for notarization:
xcrun notarytool submit setup/macos/SoundBrake-1.0.0.dmg \
--apple-id "you@example.com" --team-id "YOURTEAMID" \
--password "app-specific-password" --wait
xcrun stapler staple setup/macos/SoundBrake-1.0.0.dmgLinux packages are not code-signed in the traditional sense. You can sign the .deb with dpkg-sig or .rpm with rpmsign if your distribution requires it.
SoundBrake uses a poll-based monitor that runs on a background goroutine:
| Level | Volume Range | Warning Trigger | Action |
|---|---|---|---|
| Safe | 0–74% | Never | — |
| Level 1 | 75–84% | After 60 min sustained | Desktop notification |
| Level 2 | 85–94% | After 20 min sustained | Desktop notification |
| Critical | ≥ 95% | After 4 min sustained | Notification + auto-lower volume |
- The monitor polls the system audio API every 5 seconds.
- Exposure time is cumulative: if you listen at Level 2 for 10 minutes, switch to Level 1 for another 10 minutes, the 20 minutes count together.
- When the volume drops to Safe or you change audio output device, the exposure timer resets.
Clicking Dismiss on a notification starts a cooldown before the next warning can fire:
- Level 1 / Level 2: 15 minutes initial cooldown, doubling with each consecutive dismiss (capped at 2 hours).
- Critical: 10 minutes initial cooldown with the same backoff.
Pressing Silence 24 h from the tray suppresses all warnings for 24 hours; the state is persisted across reboots in %AppData%\SoundBrake\silence.dat (Windows) or ~/.config/SoundBrake/silence.dat (macOS/Linux).
The active audio output device is checked every 30 seconds. When a headphone plug/unplug is detected, all exposure and cooldown timers reset so the new device gets a fresh session.
main.go
├─ singleinstance — prevents duplicate processes (mutex/lock-file)
├─ i18n — auto-detects OS language (13 locales)
├─ startup — registers/removes launch-on-login entry
├─ monitor — polls audio, manages state machine, fires notifications
│ ├─ audio/ — platform-specific volume read/write (WASAPI · osascript · pactl)
│ └─ notification/ — platform-specific desktop notification
└─ tray — system tray icon, menu items, reacts to monitor state
Logs are written to:
- Windows:
%AppData%\SoundBrake\soundbrake.log - macOS / Linux:
~/.config/SoundBrake/soundbrake.log
The log file is rotated at 5 MB (renamed to soundbrake.log.old).
Contributions are welcome! Please read CONTRIBUTING.md for:
- Development environment setup
- Code conventions
- How to submit a pull request
For bug reports or feature requests, open an issue using the appropriate template:
SoundBrake is released under the MIT License.