python实现语音播放失败_PyAudio alsa错误消息
每次我用PyAudio播放声音时都会收到错误消息,并且无法抑制它们。在ALSA lib pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2217:(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:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dmix.c:1018:(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 startedOSError: libasound.so: cannot open shared object file: No such file or directory
我试过把它改成libasound.so.2,但是当你尝试播放一个声音而不是做任何事情时,它会冻结程序。在
我包括我如何使用PyAudio的源代码。在初始化类时调用alsaMessageSuppress函数。在
^{pr2}$