Reputation: 513
I'm having trouble getting pyaudio working on an Ubuntu machine (trusty). Trying to use the blocking wave-player code on the pyaudio documentation page I get:
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
Traceback (most recent call last):
File "./pyaudio-play.py", line 22, in <module>
output=True)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno Invalid output device (no default output device)] -9996
Like this post, I have no devices available, but I'm not using enthought as far as I know. Typing pyaudio.pa.__file__ returns
'/usr/lib/python2.7/dist-packages/_portaudio.so'
And I just installed libportaudio-dev and libportaudio0 via apt-get.
For what it's worth, arecord and aplay don't pick up devices either:
aplay -l
aplay: device_list:268: no soundcards found...
But they both seem to work anyway (i.e. the one records and the other plays).
I DO have devices registering
$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel
PCH
HDA Intel PCH at 0xf9120000 irq 81 1 [NVidia ]: HDA-Intel - HDA NVidia
HDA NVidia at 0xfb080000 irq 36 2 [Mic ]: USB-Audio - Samson Meteor Mic
Samson Technologies Samson Meteor Mic at usb-0000:00:1d.0-1.1, full speed 3 [NVidia_1 ]: HDA-Intel - HDA
NVidia
HDA NVidia at 0xf9080000 irq 44
(Sorry about the newlines not working correctly in this post)
Any ideas?
Upvotes: 0
Views: 2275
Reputation: 513
Had to install portaudio19-dev. This seemed to work for a minute then it broke again.
It looks like the sounds system got mucked up though; restarting a bunch of stuff (alsa, pulseaudio) seems to have fixed it, at least for now.
Upvotes: 1