Skip to content

Repository files navigation

StopSpoti

StopSpoti is a private, local Windows utility that automatically pauses Spotify when another app starts playing audio, then resumes Spotify after the sound stops.

It is designed for the familiar interruption: music is playing, you open a video or a game cutscene, and both audio sources compete with each other.

Pip listening, pausing competing audio, and snoozing

Meet Pip, StopSpoti's tiny audio guardian. The listening, pausing, and snoozing poses mirror the utility's three most important states, while Pip's headphone-and-pause face is also used for the app and notification-area icon.

Project status

StopSpoti v2.0.0-beta.1 was published on July 22, 2026. The current beta has been validated on Windows with:

  • 23 passing automated tests
  • a real Windows audio-session smoke test
  • a successful packaged-application self-check
  • visual checks of the Home, Preferences, and Diagnostics views
  • close-to-tray and scrolling behavior checks

Installer and portable ZIP artifacts are available from the beta release. Code signing and clean-machine verification remain gates before a stable release.

What users get

  • Automatic Spotify pause and safe resume ownership
  • A notification-area icon that keeps the utility out of the way
  • Snooze and manual override controls
  • Friendly sensitivity and resume-delay settings
  • Per-application ignore rules
  • Optional launch at Windows sign-in
  • Local rotating diagnostics with no account, cloud service, or Spotify login
  • Dynamic Spotify detection across app restarts
  • Recovery from new audio sessions and default-device changes

Install

For users: GitHub release

  1. Open the v2.0.0-beta.1 release.
  2. Download StopSpoti-2.0.0-Setup.exe, or choose StopSpoti-v2.0.0-beta.1-portable.zip if you prefer a portable build.
  3. Run or extract the selected build and launch StopSpoti.
  4. Keep Spotify's desktop app open and enable Automatic pause.

Release builds are generated by the Windows GitHub Actions workflow for tags matching v*. Public releases should be code-signed before being promoted broadly; unsigned development builds can trigger Windows SmartScreen.

Run from source

Requirements: Windows 10 version 1809 or newer and Python 3.10-3.14.

git clone https://github.com/Shreeniwas1/stopspoti.git
cd stopspoti
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\python.exe -m stopspoti

Or run scripts/run-dev.ps1 from PowerShell.

How it behaves

StopSpoti watches audible Windows output sessions. When a non-ignored app crosses the selected sensitivity threshold while Spotify is playing, it requests an explicit Spotify pause. It remembers that it owns the pause and resumes only after the configured silence delay.

If you manually resume Spotify while another app is audible, StopSpoti treats that as a user override and does not fight you. Disabling, snoozing, or exiting the utility restores Spotify only when StopSpoti owns the pause.

Spotify control uses Windows Global System Media Transport Controls first. A dynamically discovered Spotify window is retained as a compatibility fallback; process IDs are never cached across restarts.

Preferences

  • Sensitivity: High notices very quiet audio; Low ignores quieter sessions.
  • Resume delay: How long competing audio must remain silent before Spotify resumes.
  • Start with Windows: Adds a per-user startup entry; administrator access is not required.
  • Ignored applications: Exact executable names such as discord.exe, one per line.
  • Detailed diagnostic logging: Adds adapter and recovery details to the rotating local log.

Settings and logs are stored in %LOCALAPPDATA%\StopSpoti. Invalid settings are quarantined and safe defaults are restored.

Build a Windows release

python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\python.exe -m ruff check stopspoti tests stopspoti_app.py stopspotiv1.py
.\.venv\Scripts\python.exe -m pytest
.\.venv\Scripts\python.exe -m PyInstaller --noconfirm --clean StopSpoti.spec

The unpacked application is written to dist\StopSpoti. Build the installer with Inno Setup 6:

& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" installer\StopSpoti.iss

Architecture

The project is a modular local desktop application:

  • stopspoti/state_machine.py owns pause/resume, silence grace, and user override invariants.
  • stopspoti/audio.py owns the MTA COM lifetime, session registry, peak sampling, and device/session notifications.
  • stopspoti/spotify.py isolates GSMTC and window-message media adapters.
  • stopspoti/controller.py orchestrates adapters on one worker and publishes immutable UI status.
  • stopspoti/ui.py owns CustomTkinter and notification-area interactions on the UI thread.
  • stopspoti/settings.py provides validated, atomic, versioned local persistence.

More detail is in docs/architecture.md.

Test

python -m pytest
python -m ruff check stopspoti tests stopspoti_app.py stopspotiv1.py
python -m ruff format --check stopspoti tests stopspoti_app.py stopspotiv1.py

The 23-test suite covers the pure state machine, settings recovery and normalization, startup commands, Spotify-control fallbacks, diagnostics, brand assets, and controller recovery paths. Real Windows audio and the packaged application have also passed local smoke checks. Device-switch, sleep/resume, clean-machine installation, and long soak checks remain release-candidate gates because they require a broader Windows test environment.

Next phase roadmap

The next milestone is release hardening toward a stable v2.0.0. The published beta artifacts are currently unsigned.

1. Release hardening

  • Install Inno Setup and compile the installer locally.
  • Test installation, first launch, startup registration, upgrade, and uninstall in a clean Windows virtual machine.
  • Verify both Microsoft Store and classic desktop Spotify installations.
  • Test Bluetooth devices, default-device changes, sleep/resume, lock/unlock, and multiple simultaneous audio sessions.
  • Run an 8-24 hour soak test while monitoring CPU, memory, Windows handles, and recovery logs.
  • Run the release workflow for each candidate and smoke-test both installer and portable artifacts before promotion.
  • Sign and timestamp the executable and installer to reduce Windows SmartScreen warnings.

2. Make setup easier

  • Add a short first-run walkthrough with a live test-detection step.
  • Replace process-name-only selection with an app picker that shows friendly names and icons.
  • Add a tray shortcut to ignore the currently detected application.
  • Explain the current pause reason more clearly and keep a small local history for troubleshooting.
  • Add an in-app release notification or a privacy-preserving update checker.

3. Accessibility and product quality

  • Complete keyboard-only and screen-reader testing and improve control labels where required.
  • Add high-DPI, 125%-200% scaling, small-screen, and high-contrast checks.
  • Add integration tests for real Windows audio and media-session behavior alongside the unit suite.
  • Add a one-click diagnostic bundle export with secrets and personal data excluded.
  • Prepare translated UI strings once the English workflow is stable.

Known limitations

  • StopSpoti currently supports Windows only.
  • It controls the desktop Spotify application, not Spotify running in a browser tab.
  • Unsigned development builds may trigger a Windows SmartScreen warning.
  • Some applications keep silent audio sessions open; sensitivity controls and the ignored-apps list are provided for these cases.
  • Automatic updates are not implemented yet.

Privacy

StopSpoti runs locally. It does not require Spotify credentials, capture audio samples, upload media history, or operate a server. Diagnostics record application process names and error classes, not song or video titles.

Troubleshooting

  • Spotify is not detected: use the Spotify desktop application and start playback once so Windows creates its media session.
  • An app pauses Spotify unexpectedly: lower sensitivity or add its executable name under Ignored applications.
  • No app is detected: reconnect the output device and wait a few seconds; StopSpoti refreshes on device changes and retries transient failures.
  • The packaged build will not start: inspect %LOCALAPPDATA%\StopSpoti\logs\stopspoti.log and attach it to a GitHub issue after reviewing it.

License

MIT. See LICENSE.

About

Private Windows utility that pauses Spotify during competing audio and safely resumes it afterward.

Topics

Resources

Contributing

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages