Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after running jasper.py #722

Open
zeesh1979 opened this issue Feb 26, 2020 · 8 comments
Open

Error after running jasper.py #722

zeesh1979 opened this issue Feb 26, 2020 · 8 comments

Comments

@zeesh1979
Copy link

hi,
when i run jsper, its not running. below are logs:

pi@raspberrypi:~ $ /home/pi/jasper/jasper.py


  •         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:1052:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dmix.c:1052:(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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
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
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 750, in open
stream = Stream(self, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 441, in init
self._stream = pa.open(**arguments)
IOError: [Errno -9997] Invalid sample rate

below is my .asoudrc file (whenever i make changes to it, after reboot it goes back to same as below)

pcm.!default {
	type hw
	card 1
}

ctl.!default {
	type hw
	card 1
}

below my sound devices:
pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 8/8
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
Subdevice #7: subdevice #7
card 1: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0

below my /etc/asound.conf:
pcm.!default {
type asym
capture.pcm "mic"
playback.pcm "speaker"
}
pcm.mic {
type plug
slave {
pcm "hw:0,0"
}
}
pcm.speaker {
type plug
slave {
pcm "hw:1,0"
}
}

@nikhilgg
Copy link

Did you find a solution?

I've the same issue. I had set it up 8-9 months ago. Used to work. Restarted the pi today after a long time and face this issue when trying to use Jasper.

@zeesh1979
Copy link
Author

zeesh1979 commented Apr 16, 2020 via email

@appeacock
Copy link

The work is being continued at https://github.com/aplawson/jasper-client, specifically an update to Python3 and a tutorial on how to build it or deploy it with a custom Raspbian ISO image. //adam

@zeesh1979
Copy link
Author

zeesh1979 commented Apr 28, 2020 via email

@appeacock
Copy link

appeacock commented Apr 28, 2020

I would attach a monitor and watch the output while the rPI is booting. That will disclose many issues (and when they occur) during the boot-up process. //adam

@appeacock
Copy link

Also there are two projects with an rPI image. https://sourceforge.net/projects/jasperproject has a stale/broken image. https://sourceforge.net/projects/jasperclient has an image that was tested in February or March of this year so much more current.

@zeesh1979
Copy link
Author

zeesh1979 commented Apr 28, 2020 via email

@zeesh1979
Copy link
Author

zeesh1979 commented Aug 27, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants