Python Forum
Change Windows Sound Output Device with Python
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change Windows Sound Output Device with Python
#1
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!
Reply
#2
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/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  output values change akbarza 3 487 Oct-18-2023, 12:30 PM
Last Post: deanhystad
  Find a specific keyword after another keyword and change the output sgtmcc 5 746 Oct-05-2023, 07:41 PM
Last Post: deanhystad
  Rain sensor output only on change Pete6 3 1,986 May-11-2022, 10:36 PM
Last Post: Pete6
  Sending string commands from Python to a bluetooth device Rovelin 13 9,282 Aug-31-2021, 06:40 PM
Last Post: deanhystad
  Python BLE Scanner not detecting device alexanderDennisEnviro500 0 1,972 Aug-01-2021, 02:29 AM
Last Post: alexanderDennisEnviro500
  Image to Sound Python Project ankitdixit 1 2,543 Jul-26-2021, 08:20 PM
Last Post: snippsat
  Real Time Audio Processing with Python Sound-Device not working Slartybartfast 2 3,881 Mar-14-2021, 07:20 PM
Last Post: Slartybartfast
  Play fixed frequency sound in python 3 jpezz 2 2,723 Feb-07-2021, 08:21 PM
Last Post: jpezz
  Python 3.7, Windows 10, pyinstaller, winsound, no sound in executable kmarien 3 3,588 Nov-30-2020, 04:10 PM
Last Post: buran
  change mouse cursor (in Windows) mgroen 0 1,593 Nov-11-2020, 11:26 AM
Last Post: mgroen

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020