PyAudio is trying to use JACK

I am running PyAudio under Python 2.6.6 and would like it to use ALSA, not JACK.

In [1]: import pyaudio

In [2]: pa = pyaudio.pa

In [3]: pa.initialize()
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
+3
source share
1 answer

For those who ended up in this old question via Google:

Message displayed by pyaudio ...

jack server is not running or cannot be started

... is informative, not a mistake. This means that portaudio tried and was unable to connect to Jack, but does not mean that he refused everything.

At this point, you should have a fully functional PyAudio object using ALSA. You can check this, for example, by looking at the list of available devices:

>>> import pyaudio
>>> pa = pyaudio.PyAudio()
[...lots of crap from ALSA...]
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
>>> print '\n'.join([y['name'] 
... for y in [pa.get_device_info_by_index(x)
... for x in range(pa.get_device_count())]])
bcm2835 ALSA: - (hw:0,0)
bcm2835 ALSA: IEC958/HDMI (hw:0,1)
USB Audio Device: - (hw:2,0)
sysdefault
dmix
default
+5
source

Source: https://habr.com/ru/post/1785027/


All Articles