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
  Rain sensor output only on change Pete6 4 3,705 Mar-10-2025, 06:45 PM
Last Post: ggtux
  eth0: [ERROR] Set device name: No such device inkmin 0 607 Oct-03-2024, 12:52 AM
Last Post: inkmin
  cheap and low power python device kucingkembar 6 1,514 Jun-27-2024, 12:41 PM
Last Post: kucingkembar
  output values change akbarza 3 1,499 Oct-18-2023, 12:30 PM
Last Post: deanhystad
  Find a specific keyword after another keyword and change the output sgtmcc 5 1,905 Oct-05-2023, 07:41 PM
Last Post: deanhystad
  Sending string commands from Python to a bluetooth device Rovelin 13 15,843 Aug-31-2021, 06:40 PM
Last Post: deanhystad
  Python BLE Scanner not detecting device alexanderDennisEnviro500 0 2,561 Aug-01-2021, 02:29 AM
Last Post: alexanderDennisEnviro500
  Image to Sound Python Project ankitdixit 1 4,303 Jul-26-2021, 08:20 PM
Last Post: snippsat
  Real Time Audio Processing with Python Sound-Device not working Slartybartfast 2 6,181 Mar-14-2021, 07:20 PM
Last Post: Slartybartfast
  Play fixed frequency sound in python 3 jpezz 2 3,975 Feb-07-2021, 08:21 PM
Last Post: jpezz

Forum Jump:

User Panel Messages

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