spatialaudio / python-sounddevice

:sound: Play and Record Sound with Python :snake:
https://python-sounddevice.readthedocs.io/
MIT License
980 stars 145 forks source link

Stream Mono Input to Stereo Output? #450

Open Ethan-Poag opened 1 year ago

Ethan-Poag commented 1 year ago

Is it possible to stream a mono input to a stereo output using this tool? If so, how would I do that? Thanks. when running $ python -m sounddevice on my windows computer I am able to pick up about a dozen sound devices for my USB headset including a stereo input from the microphone, but on my Manjaro linux computer the same command only picks up one mono input and one stereo output. Any help would be appreciated. Thank you!

mgeier commented 1 year ago

Is it possible to stream a mono input to a stereo output using this tool?

Yes, just make a copy of the one channel to generate a two-channel output.

when running $ python -m sounddevice on my windows computer I am able to pick up about a dozen sound devices for my USB headset including a stereo input from the microphone, but on my Manjaro linux computer the same command only picks up one mono input and one stereo output.

The list of devices and their properties depend on the underlying PortAudio library. If you have questions about that, you should ask over there: http://portaudio.com/contacts.html