我正在使用 python 的模块 pyaudio 来处理声音,但 ALSA 返回:
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.rear
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
Alsa 在录制声音并从终端播放时运行良好,但 python (2.7) 不断返回这些错误。我不知道这是否相关,但我也可以双启动到 Windows 8.1。
答案1
这可以消除未知设备消息:
sudo nano /usr/share/alsa/alsa.conf
并注释掉未知设备列出的cards.pcm.{device}
位置{device}
这将消除 jack 服务器错误,不确定其他的
sudo apt install multimedia-jack
pulseaudio --kill
jack_control start
如果运行后出现内存错误,请注销/登录:
sudo usermod -a -G audio MYUSERNAME
确保您已注销/登录,否则权限将不会更新。
您可能需要运行:
jack_control start
再次