How to install PyAudio? (L4T 32.2.3)

Hi DaneLLL,
With your help on resolving the problem of “arecord” for microphone (for those who are interested, see the link in my post for details), I figured out how to run the PyAudio.

Well, it’s quite simple once knowing what to do. First, the error messages in my post are false alarm. Ignore them and keep going. Second, the real key is in the setting of opening the audio stream, which is related to the “arecord” issue as above.

I took the code from

mabdrabo/sound_recorder.py

https://gist.github.com/mabdrabo/8678538

And I set the channels to ‘2’ (I was wrong to set it to ‘1’ before), and added a parameter “input_device_index” to the open() methodfor pyaudio. In my case the index need to be ‘11’ for the USB Mic.

CHANNELS = 2
MIC_INDEX = 11

# start Recording
stream = audio.open(format=FORMAT, channels=CHANNELS, input_device_index=MIC_INDEX,
                rate=RATE, input=True,
                frames_per_buffer=CHUNK)

The rest are the same as in mabdrabo’s sound_recorder.py
I tested and worked.

Cheers!