PulseAudio: Unable to connect: Connection refused

388 views
Skip to first unread message

Clayton High

unread,
Jun 9, 2017, 8:56:35 PM6/9/17
to Jasper Support Forum
Hi everyone. I'm trying to get jasper set up on raspberry oi 3. I have most of the errors worked out but I'm still having some trouble with alsa. This is the message I get when I run jasper,py
*******************************************************
*             JASPER - THE TALKING COMPUTER           *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2719
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843
Traceback (most recent call last):
  File "jasper.py", line 151, in <module>
    app.run()
  File "jasper.py", line 121, in run
    conversation.handleForever()
  File "/home/pi/jasper/client/conversation.py", line 31, in handleForever
    threshold, transcribed = self.mic.passiveListen(self.persona)
  File "/home/pi/jasper/client/mic.py", line 110, in passiveListen
    frames_per_buffer=CHUNK)
  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 sample rate] -9997


Running both arecord -l and aplay -l both give me a (correct) list of devices. I reinstalled libasound2, but it had no effect. Any help would be appreciated!

RadioFreeRO

unread,
Jun 11, 2017, 2:24:20 PM6/11/17
to Jasper Support Forum
My 1st question would be do you supply your RPi with the (actually) necessary 3A? The requirements on the RPi website for the RPi3 are completely inaccurate as most have found out. Usually the RPi will show a lightning bolt in the corner for any, and all power issues. Also 2.5A (as "required" according to the RPi website) will never give you remotely enough power, and other than flash memory (thumb/ finger sized usb drives) the RPi can not use anything VIA usb 2.0 without a powered usb hub. That means a hub with an optional power supply that converts AC to DC in order to power your devices correctly. However in the case of the RPi 3 it is mandatory to use the "optional" power supply the usb hub comes with, and the RPi3 can not be connected to this usb hub for it's own power because hubs do not give enough amperage to run the RPi.
Reply all
Reply to author
Forward
0 new messages