pyaudio还需要其他依赖,在当前环境中下载sounddevice和portaudio
pip install sounddevice
pip install portaudio
此外,如果运行的时候出现了Couldn‘t find ffmpeg or avconv - defaulting to ffmpeg, but may not work“, RuntimeWarning
还需要下载ffmpeg
我用的是mac,下载命令是brew install ffmpeg
最后查看一下是否下载成功ffmpeg -version