Python Forum

Full Version: Easy-to-use volume control in Windows
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all Big Grin ! I recently had to control the windows master volume automaticall via a python script, but none of the solutions i found online were really functional. The only thing i found was to use the PyCaw library in order to interect with the audio, and I thought that would work.

The thing is that PyCaw used a scale based on decibel, which means it was logarithmic, making it hard to work with. The values ranged from 0 (max volume) to -28 (muted). So sat down and made a polynomial that would convert our standard 0-100 scale to PyCaw's logarithmic scale, to make it easier to use. You can install the library via pip like this:

pip install winv
Hope you guys have some use for it!

Edit: The documentation can be found on the github page here