该问题涉及到这个pydub问题。他们告诉我错误信息与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
音频本身播放得很好。我该如何防止出现错误。