crashboogie
Posts: 34
Joined: Thu Aug 04, 2016 4:03 am

Need some help setting up Jasper

Fri May 12, 2017 12:36 am

Not entirely sure whats going on. Trying to setup my Raspberry Pi 3 with Jasper using a Fifine K668 USB mic https://www.amazon.com/Microphone-Fifin ... B01D4HTIOY and just a standard speaker plugged into the on-board audio out jack. Not even 100% whether the USB mic is compatible or not but I can't imagine it wouldn't be. When I run it Jasper says "How can I be of service Crash?" and bogs out, doesn't respond to anything. Hoping someone could take a look and point out my dumb mistake. Thanks! :D

This is the output after running /home/pi/jasper/jasper.py

Code: Select all

WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts'
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.rear
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
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
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

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
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 "/home/pi/jasper/jasper.py", line 151, in <module>
    app.run()
  File "/home/pi/jasper/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
/usr/share/alsa/alsa.conf specifies these in part of the code

Code: Select all

# defaults
#

# show all name hints also for definitions without hint {} section
defaults.namehint.showall on
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended on
#
defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 0
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.compat 0
and my profile.yml is

Code: Select all

carrier: message.ting.com
first_name: crash
gmail_address: *******
gmail_password: ******
keys:
  GOOGLE_SPEECH: ********
last_name: boogie
location: *****
phone_number: ********
prefers_email: true
stt_engine: google
timezone: ******
and my ~/.asoundrc code is

Code: Select all

pcm.!default {
        type hw
        card 1
}

ctl.!default {
        type hw
        card 1
}

User avatar
g10dras
Posts: 2
Joined: Fri May 19, 2017 1:59 am
Contact: Website

Re: Need some help setting up Jasper

Fri May 19, 2017 2:15 am

Well try below configuration in /etc/asound.conf or ~/.asoundrc

https://groups.google.com/forum/#!topic ... DVGFcu_NOs

User avatar
g10dras
Posts: 2
Joined: Fri May 19, 2017 1:59 am
Contact: Website

Re: Need some help setting up Jasper

Fri May 19, 2017 2:18 am

Well try this config in ~/.asoundrc

https://groups.google.com/forum/#!topic/robocopai/YDVGFcu_NOs

crashboogie
Posts: 34
Joined: Thu Aug 04, 2016 4:03 am

Re: Need some help setting up Jasper

Fri May 19, 2017 2:04 pm

YES!!!! Been stuck on this for a week now and I think that did the trick. I'm getting a 403 error code now but it says it's likely the google API key so I'll tinker on that when I get home. You're a genius. Thank you kind stranger :D

Return to “General discussion”