未知 PCM cards.pcm.rear (pyaudio)

Unknown PCM cards.pcm.rear (pyaudio)

问题与此pydub-Issue有关。他们告诉我错误消息与pyaudio有关。

#!/usr/bin/env python3

import pydub, pydub.playback

wav = pydub.AudioSegment.from_wav('/home/user/complete.wav')
pydub.playback.play(wav)

此代码引发了我不理解的错误。

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)
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

wav本身播​​放的很好。我怎样才能防止这些错误。

删除以下蓝牙包时会删除被拒绝的连接(如果您真的想要)sudo apt-get remove bluez-alsa

通过注释掉 /usr/share/alsa/alsa.conf 中的相关行删除未知的 PCM 卡。

其他的我不知道,但你可以从这里开始看:PyAudio working, but spits out error messages each time