声音 – alsa问题python2.7-无法打开奴隶

我正在使用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.

解决方法:

这可以摆脱未知设备消息:
sudo nano /usr/share/alsa/alsa.conf并注释掉cards.pcm.{device}其中{device}是列出的未知设备

这将摆脱杰克服务器错误,不确定其他人

sudo apt install multimedia-jack
pulseaudio --kill
jack_control  start

如果在运行后出现内存错误,请注销/登录:

sudo usermod -a -G audio MYUSERNAME

确保您已注销,否则权限将不会更新.

您可能需要运行:

jack_control  start

再次

上一篇:linux – 如何让Debian的音量控制与Pulse配合使用


下一篇:python – Raspberry ALSA声音输出/输入从属