Reputation: 141
I have a USB headphones connected to system. So now my system has two different audio output devices (one internal speakers and other is USB headphone). Though it is possible t choose the default the output device. What i am interested is play different audio on each of the device at the same time. In other words i am looking for a program solution which gives freedom to choose the device on which the audio should be played. By any means, using any library is this possible?
Upvotes: 4
Views: 7321
Reputation: 4894
If you use sounddevice.play(), you can simply specify the desired device
with each call.
You can either use the device ID (e.g. device=3
) or a substring of the device name (e.g. device='headphone'
, if that's part of the device name).
You can get a list of devices with:
python3 -m sounddevice
Upvotes: 5