Python Forum
Change Windows Sound Output Device with Python - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Change Windows Sound Output Device with Python (/thread-5030.html)



Change Windows Sound Output Device with Python - delfar - Sep-14-2017

Hey there,

On my main PC I have several different sound output devices that I have to constantly switch between. This process is tedious, as I have to go into the windows 'Playback Devices' menu, and search through my connected devices, and then set the one I want in the moment to my systems default output. 

As a work around for this I am attempting to create a physical switch box with an Arduino Uno. Each button, when pressed, will switch my default output to the programmed device that button represents. To control the windows side of things, I am hoping to have a python script that will listen for a serial command from the Arduino, and then change the default device accordingly. 

My question is.. 
Is there a way in python to change this setting on the Window OS? 
I have researched a bunch into different libraries that may be able to help, but so far no luck. 


Any suggestions would be great.

Thanks!


RE: Change Windows Sound Output Device with Python - Larz60+ - Sep-15-2017

Not sure, but possibly portaudio: http://www.portaudio.com/
You'll have to dig into the docs.

wiki: https://app.assembla.com/wiki/show/portaudio/