PyAudio does not work and breaks sound on ubuntu

So, I installed pyaudio from the python-pyaudio package using apt-get , now when I import and call as follows:

 Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pyaudio >>> p= pyaudio.PyAudio() 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 ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable ALSA lib pcm_params.c:2162:(snd1_pcm_hw_refine_slave) Slave PCM not usable ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream 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 

He spits out these error messages. After some research, I found this question:

PyAudio works, but every time it displays error messages

And the answers mention that these are just warnings

But for me, the sound actually does not work and interrupts the sound in my system, forcing the sound applet to show all spaces and work without sound.

Before:

After:

Is this a problem that I can fix?

+7
python ubuntu pulseaudio pyaudio
Mar 03 '13 at 4:02
source share
2 answers

You need to configure alsa correctly, make sure that the iscord function and the default device correctly record sound. If it is fixed, it should start working.

It is better to recompile PyAudio (Portaudio) without Jack and Alsa with Pulseaudio support.

Pulseaudio is the standard sound environment in Ubuntu and should work without problems.

0
Dec 27 '16 at 14:29
source share

You need a JACK daemon to which it is trying to connect:

 jack server is not running or cannot be started 

It should come with most major Linux distributions if it is not already installed. You should probably take a look at the page and decide which audio architecture you need (possibly ALSA) and at what speed you want to run it. I can also recommend using a GUI like QJackCtl , as JACK sometimes needs some tweaking depending on your sound card.

-one
Mar 14 '13 at 14:52
source share



All Articles