Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python change audio output device

You can do print(sd.query_devices()) to print out all devices that you may use, for example

>  1 Mikrofon (3 — Urzadzenie zgodne, MME (2 in, 0 out)
   2 Mikrofon (3 — Urzadzenie zgodne, MME (2 in, 0 out)
   3 Mapowanie dzwieku Microsoft - Output, MME (0 in, 2 out)
<  4 Sluchawki (3 — Urzadzenie zgodn, MME (0 in, 2 out)
   5 Glosniki (3 — Urzadzenie zgodne, MME (0 in, 2 out)
Right now you can see, that there is an input device with index 1 and an output device with index 4.

You can now set your pair of in/out devices by typing

sd.default.device = [index_of_input_device,index_of_output_device]
Comment

PREVIOUS NEXT
Code Example
Python :: root value of a column pandas 
Python :: executing curl commands in python 
Python :: remove element from list by index 
Python :: how to set the value of a variable null in python 
Python :: random normal 
Python :: cursor.fetchall() to list 
Python :: tkinter maximise window 
Python :: numpy multiply element wise 
Python :: python heatmap 
Python :: highlight null/nan values in pandas table 
Python :: Code to implement iterative Binary Search 
Python :: Modify a Python interpreter 
Python :: import matlab python 
Python :: modern tkinter 
Python :: selenium do not open browser window 
Python :: new column with addition of other columns 
Python :: length of a string python 
Python :: find average with sum and len in python 
Python :: create an array with a range of elements 
Python :: css selenium 
Python :: a sigmoid function 
Python :: python cls command line 
Python :: seaborn library in python 
Python :: upload file to s3 
Python :: python basic flask web 
Python :: how to change values in dataframe python 
Python :: push notification using python 
Python :: get coordinates of netcdf in python 
Python :: optimize images using pillow 
Python :: django bulk update 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =