This Python script enables you to control the sound (mute/unmute) of a specific program by pressing certain keys. It can be handy, for example, when you need to quickly mute a program without switching to it.
The script listens for specific key presses using the pynput library. When a predefined key combination is detected, it mutes or unmutes the sound of the specified program using the Windows Core Audio API.
- The application allows users to select the target program from a dropdown menu.
- Users can then assign custom hotkeys for muting and unmuting the selected program.
- After configuring the hotkeys, users can control the sound (mute/unmute) of the selected program by pressing the assigned keys.
-
Clone this repository:
git clone https://github.com/antisedativ/soundControl.git
-
Install the required dependencies:
pip install -r requirements.txt
-
Open the
main.pyfile and modify thePROGRAMvariable to specify the name of the program whose sound you want to control. -
Run the script:
python main.py
-
Press the predefined key combination (default: AltGr + Ctrl) to mute/unmute the sound of the specified program.
OR
- Run the script:
pyinstaller --onefile --noconsole --name "Sound Control" main.py
- Python 3.x
- pynput
- tkinter
- PyCaw
Contributions are welcome! If you find a bug or have a suggestion for improvement, feel free to open an issue or create a pull request.
- Volume Adjustment Functionality: Implement features to adjust the volume of the target application, allowing users to increase or decrease the volume as needed.
- Enhanced Visual Appearance: Improve the aesthetics and user interface design to make the application more visually appealing and user-friendly.