I\'m using pyaudio in a school project and I\'m trying to get the sound to play on only one speaker at a time. My code is like this:
import pyaudio p = pyau
Instead of PyAudio, you could use http://python-sounddevice.rtfd.org/.
The play() function accepts a mapping argument to select the channel(s) to play back on.
mapping
You could try this to play a mono NumPy array on the right channel:
import sounddevice as sd sd.play(signal, samplerate=44100, mapping=[2])