2

When running the following code using python 2.7 (in Ubuntu 14.04)

import pyaudio
p = pyaudio.PyAudio()

I get the following exception:

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

Your help would be highly appreciated

1
  • Same error in ubuntu 20.04 python3.6 Commented Jun 2, 2020 at 23:49

1 Answer 1

2

Do you have bluez-alsa package installed? If so remove it, and re-test. Should get rid of the errors.

If not there is also some discussion here (https://github.com/Katee/quietnet/issues/18) that might be helpful.

ALSA lib pcm.c:7843:(snd_pcm_recover) underrun occurred

The underun is likely caused because pulseaudio is already accessing 
the card - you can pause it using http://linux.die.net/man/1
/pasuspender. In general to avoid such deadlock, you need a 
soundserver like jackd https://help.ubuntu.com/community/What%20is%20JACK, but you already figured this out from the following log
entries in your trace ;-) (apt-get install jackd)
Sign up to request clarification or add additional context in comments.

1 Comment

I removed bluez-alsa and the "bt_audio_service_open" errors were removed, but the recording still does not work

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.