使用 python 2.7 运行以下代码时(在 Ubuntu 14.04 中)
import pyaudio
p = pyaudio.PyAudio()
我收到以下异常:
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
bt_audio_service_open: connect() failed: Connection refused (111)
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel jack server is not running or cannot be started
非常感谢您的帮助
最佳答案
您是否安装了 bluez-alsa
软件包?如果是这样,请将其删除并重新测试。应该消除错误。
如果没有,这里也有一些讨论(https://github.com/Katee/quietnet/issues/18)可能会有所帮助。
ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred
The underun is likely caused because pulseaudio is already accessing
the card - you can pause it using http://linux.die.net/man/1
/pasuspender. In general to avoid such deadlock, you need a
soundserver like jackd https://help.ubuntu.com/community/What%20is%20JACK, but you already figured this out from the following log
entries in your trace ;-) (apt-get install jackd)
关于python - 在 Ubuntu 14.04 上使用 python 读取音频时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33017555/