how to install portaudio on pi properly

前端 未结 1 555
抹茶落季
抹茶落季 2021-01-01 05:53

I am working on a project that involves recording from a mic on a raspberry pi. for now i am getting this error while the program is running.

python3

相关标签:
1条回答
  • 2021-01-01 06:21

    Your first link correctly identifies a bug in portaudio, but the fix is incomplete. I forked the portaudio library and created a patch to fix this. Here are the steps to remove the portaudio package and compile the patched version from source:

    sudo apt-get remove libportaudio2
    sudo apt-get install libasound2-dev
    git clone -b alsapatch https://github.com/gglockner/portaudio
    cd portaudio
    ./configure && make
    sudo make install
    sudo ldconfig
    cd ..
    

    At this point, you should have a patched portaudio library, based on the pa_stable_v190600_20161030 tag. Finally, if you need the PyAudio package for Python, then install it using pip: sudo pip3 install pyaudio.

    0 讨论(0)
提交回复
热议问题