Problem with Jasper on Jessie

364 views
Skip to first unread message

Pawan Shah

unread,
Feb 22, 2016, 12:42:18 AM2/22/16
to Jasper Support Forum
Hi,
I have the latest raspian jessie installed on Rspberry pi 2 (Feb 2016 release).

I got a problem on the first step itself which was setting up some alsa config.
The alsa config /etc/modprobe.d/alsa-base.conf is missing on jessie.
I got some other config /usr/share/alsa/alsa.conf where i could not see the mentioned lines.

So I decided to go ahead with rest of the process and everything went well.
I setup PocketSphinx as stt engine.

Now when I run /home/pi/jasper/jasper.py 

I get the following long error? Can someone help?

*******************************************************

*             JASPER - THE TALKING COMPUTER           *

* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *

*******************************************************

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_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 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

WARNING:client.notifier:gmail_address or gmail_password not set in profile, Gmail notifier will not be used

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 148, in <module>

    app.run()

  File "/home/pi/jasper/jasper.py", line 118, 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

Tymoti

unread,
Aug 31, 2016, 5:17:58 PM8/31/16
to Jasper Support Forum
Hi pawan,

Do you resolve your problem ? Because I'm having the problem.

Thanks

Matthew Curry

unread,
Sep 1, 2016, 2:15:23 PM9/1/16
to Jasper Support Forum
This is just an error showing that you have not setup your audio correctly.

Tymoti

unread,
Sep 5, 2016, 3:15:26 AM9/5/16
to Jasper Support Forum
Hi @Matthew,

Thanks for your answer.
But I don't understand why I this error :

ALSA lib pcm_dmix .c:1022:(snd_pcm_dmix_open) unable to open slave

My .asoudrc :

pcm.dmixed {
    type dmix
    ipc_key 1024
    ipc_key_add_uid 0
    slave.pcm "hw:1,0"
}
pcm.dsnooped {
    type dsnoop
    ipc_key 1025
    slave.pcm "hw:0,0"
}

pcm.duplex {
    type asym
    playback.pcm "dmixed"
    capture.pcm "dsnooped"
}

# Instruct ALSA to use pcm.duplex as the default device
pcm.!default {
    type plug
    

Thank you

Matthew Curry

unread,
Sep 12, 2016, 11:10:59 AM9/12/16
to Jasper Support Forum
What hardware are you using?

First, remove the .asoundrc

Then setup the hardware correctly in alsa.conf, and reboot.  Join us in slack, and I can help more.

Francis

unread,
Sep 13, 2016, 4:35:03 AM9/13/16
to Jasper Support Forum
Thanks Matthew.

I joined you.

I resolved my problem when I copied my

/home/pi.asoundrc

writed above in

/root/.asoundrc

Reply all
Reply to author
Forward
0 new messages