简体   繁体   English

尝试在 ubuntu 上运行 pyaudio 时出现错误

[英]I get errors when trying to run pyaudio on ubuntu

I am trying to run a code, that is able to record audio from the mic.我正在尝试运行一个能够从麦克风录制音频的代码。

But i am getting this error:但我收到此错误:

line 86, in record 
    stream = p.open(format=FORMAT,channels=CHANNELS,rate=RATE,output=True,input=True,frames_per_buffer=CHUNK)
  File "/usr/lib/python3/dist-packages/pyaudio.py", line 750, in open
    stream = Stream(self, args, *kwargs)
  File "/usr/lib/python3/dist-packages/pyaudio.py", line 441, in _init_
    self._stream = pa.open(**arguments)
OSError: [Errno -9996] Invalid output device (no default output device)

I tried to uninstall pulseaudio, python but nothing is working我试图卸载pulseaudio,python,但没有任何工作

I am trying to run a code, that is able to record audio from the mic.我正在尝试运行一个能够从麦克风录制音频的代码。

But i am getting this error:但我收到此错误:

line 86, in record 
    stream = p.open(format=FORMAT,channels=CHANNELS,rate=RATE,output=True,input=True,frames_per_buffer=CHUNK)
  File "/usr/lib/python3/dist-packages/pyaudio.py", line 750, in open
    stream = Stream(self, args, *kwargs)
  File "/usr/lib/python3/dist-packages/pyaudio.py", line 441, in _init_
    self._stream = pa.open(**arguments)
OSError: [Errno -9996] Invalid output device (no default output device)

I tried to uninstall pulseaudio, python but nothing is working我试图卸载pulseaudio,python,但没有任何工作

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM