1

I wish to develop an application in python which is able to read in data from a soundcard (think engineering waveform analysis). I need to be able to read in the left channel and right channel in separately.

Using pyAudio, we are able to either select mono or stereo:

 pa = pyaudio.PyAudio()
    _stream = pa.open(format=pyaudio.paInt16, channels=1, rate=SAMPLING_RATE,
                 input=True, frames_per_buffer=NUM_SAMPLES)

Is anyone aware of a way to reach each channel individually?

Thanks

jtnire
  • 1,348
  • 5
  • 21
  • 32
  • I found the solution here: http://stackoverflow.com/questions/22636499/convert-multi-channel-pyaudio-into-numpy-array Worked fine for me! Good luck! – Lucas May 08 '17 at 22:59

1 Answers1

0

I've only ever seen this done where both channels are read together as an interleaved stream, and then split. This is a common approach and easy to do, and I also can't quite imagine a good reason to do it any other way.

tom10
  • 67,082
  • 10
  • 127
  • 137