A lightweight Python-based automation tool designed for SteelSeries Sonar users.
SteelSeries Sonar has a known issue where audio routing becomes "leaky" during screen sharing or streaming (e.g., on Discord). Other participants often hear their own voices echoed back or hear system sounds that should be isolated. This happens because Sonar fails to properly separate audio streams across virtual channels like Gaming and Microphone during active sessions.
SonarMute Automator solves this by automatically muting specific applications on designated virtual channels upon Windows startup. It ensures that apps like Discord remain silent on channels where they would otherwise cause feedback loops, effectively killing the echo once and for all.
- Smart Device Selector: Automatically lists all active audio devices and identifies applications currently using audio via an interactive terminal menu.
- Precision Muting: Targets a specific application on a specific virtual channel (e.g., muting Discord only on the 'Microphone' channel).
- Ghost-Mode Execution: Runs invisibly in the background without a console window.
- Cursor-Safe Automation: Specifically engineered to prevent the Windows "Loading" (blue circle) cursor from appearing during execution.
- Zero-Footprint: Executes the command once and terminates immediately, leaving 0% CPU and RAM usage after the task is done.
- Auto-Installer: Handles all Python dependencies and installs
NirCmdautomatically if missing.
Ensure you have Python installed on your Windows machine.
- Download the repository and navigate to the folder.
- Run
main.pyas Administrator.- Note: Admin rights are required for the script to automatically install bağımlılıklar and NirCmd into the system directory.
- Follow the interactive terminal prompts:
- Select the Audio Device you want to target (e.g.,
SteelSeries Sonar - Microphone). - Select the Application you want to mute (e.g.,
Discord.exe).
- Select the Audio Device you want to target (e.g.,
- This will generate a
config.jsonfile in your project directory.
- Run
startup.pyw. - On the first run, it will prompt you to locate your
config.json. Select it, and the tool will remember this path for future boots. - To make this automatic:
- Press
Win + R-> Typeshell:startup-> Enter. - Create a Shortcut of
startup.pywand move it into that folder.
- Press
The core challenge with SteelSeries Sonar is its complex virtual routing. Standard audio libraries often fail to distinguish between virtual channels because they share the same process names. This tool bypasses those limitations:
Instead of relying on fragile "Friendly Names," the tool uses PowerShell Integration to query the Windows Registry for unique Endpoint GUIDs. This ensures the script targets the exact virtual hardware ID assigned to Sonar channels with 100% accuracy.
We utilize NirCmd as a high-performance backend to interact directly with the Windows Audio Session API (WASAPI). This allows us to manipulate individual application "streams" within a specific audio endpoint at the kernel level.
To maintain a seamless experience, startup.pyw uses specific Windows API flags:
CREATE_NO_WINDOW&DETACHED_PROCESS: Prevents terminal flickering and background process ghosting.STARTUPINFOFlags: Prevents Windows from triggering the "Loading" cursor icon, making the automation feel like a native OS function.- Fire-and-Forget: The script runs once, applies the mute, and closes itself immediately.
The script automatically installs the following if missing:
pycaw(Python Core Audio Windows Library)inquirer(For the terminal-based interactive menu)comtypes(For Windows COM interface communication)NirCmd(For system-level audio manipulation)
This tool mutes the volume of the selected application on a specific channel. If you wish to unmute it later, you must do so manually via the Windows Volume Mixer or by modifying the config.json.