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?
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With