15

The question is related to this pydub-Issue. They told me the error message is related to pyaudio.

#!/usr/bin/env python3

import pydub, pydub.playback

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

This code raise that errors I don't understand.

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

The wav itself is played well. How can I prevent that errors.

buhtz
  • 10,774
  • 18
  • 76
  • 149

1 Answers1

10

Refused connections are removed when removing the following bluetooth package (if you really want to) sudo apt-get remove bluez-alsa

Unknown PCM cards are removed by commenting out relevant lines in /usr/share/alsa/alsa.conf.

The others I don't know about, but you could start looking here: PyAudio working, but spits out error messages each time.

Community
  • 1
  • 1
Danimal
  • 1,208
  • 10
  • 21