Hello all. I've been trying for 3 days to get this working, and it keeps failing with various audio errors.
Yes, I followed the post-image instructions to the letter.
Here's the debug info:
*******************************************************
* JASPER - THE TALKING COMPUTER *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
DEBUG:client.diagnose:Checking network connection to server 'www.google.com'...
DEBUG:client.diagnose:Network connection working
DEBUG:__main__:Trying to read config file: '/home/pi/.jasper/profile.yml'
DEBUG:client.diagnose:Checking network connection to server 'www.google.com'...
DEBUG:client.diagnose:Network connection working
DEBUG:client.diagnose:Checking executable 'aplay'...
DEBUG:client.diagnose:Executable 'aplay' found: '/usr/bin/aplay'
DEBUG:client.diagnose:Checking network connection to server 'www.google.com'...
DEBUG:client.diagnose:Network connection working
DEBUG:client.brain:Looking for modules in: '/home/pi/jasper-client/client/modules'
DEBUG:client.brain:Found module 'Birthday' with words: ['BIRTHDAY']
DEBUG:client.brain:Found module 'Gmail' with words: ['EMAIL', 'INBOX']
DEBUG:client.brain:Found module 'HN' with words: ['HACKER', 'NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Joke' with words: ['JOKE', 'KNOCK KNOCK']
DEBUG:client.brain:Found module 'Life' with words: ['MEANING', 'OF', 'LIFE']
DEBUG:client.brain:Found module 'MPDControl' with words: ['MUSIC', 'SPOTIFY']
DEBUG:client.brain:Found module 'News' with words: ['NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Notifications' with words: ['FACEBOOK', 'NOTIFICATION']
DEBUG:client.brain:Found module 'Time' with words: ['TIME']
DEBUG:client.brain:Found module 'Unclear' with words: []
DEBUG:client.brain:Found module 'Weather' with words: ['WEATHER', 'TODAY', 'TOMORROW']
INFO:client.mic:Initializing PyAudio. ALSA/Jack error messages that pop up during this process are normal and can usually be safely ignored.
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
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 confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
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
INFO:client.mic:Initialization of PyAudio completed.
DEBUG:client.tts:Saying 'How can I be of service, Charles?' with 'mary-tts'
INFO:requests.packages.urllib3.connectionpool:Starting new HTTP connection (1): tts.mattcurry.com
DEBUG:requests.packages.urllib3.connectionpool:"GET /locales HTTP/1.1" 200 59
DEBUG:requests.packages.urllib3.connectionpool:"GET /voices HTTP/1.1" 200 372
DEBUG:requests.packages.urllib3.connectionpool:"GET /process?VOICE=cmu-slt-hsmm&LOCALE=en_US&INPUT_TYPE=TEXT&OUTPUT_TYPE=AUDIO&AUDIO=WAVE_FILE&INPUT_TEXT=How+can+I+be+of+service%2C+Charles%3F HTTP/1.1" 200 64684
DEBUG:client.tts:Executing aplay -D plughw:1,0 /tmp/tmpxdPcyc.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpxdPcyc.wav' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono
'
DEBUG:client.brain:Looking for modules in: '/home/pi/jasper-client/client/modules'
DEBUG:client.brain:Found module 'Birthday' with words: ['BIRTHDAY']
DEBUG:client.brain:Found module 'Gmail' with words: ['EMAIL', 'INBOX']
DEBUG:client.brain:Found module 'HN' with words: ['HACKER', 'NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Joke' with words: ['JOKE', 'KNOCK KNOCK']
DEBUG:client.brain:Found module 'Life' with words: ['MEANING', 'OF', 'LIFE']
DEBUG:client.brain:Found module 'MPDControl' with words: ['MUSIC', 'SPOTIFY']
DEBUG:client.brain:Found module 'News' with words: ['NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Notifications' with words: ['FACEBOOK', 'NOTIFICATION']
DEBUG:client.brain:Found module 'Time' with words: ['TIME']
DEBUG:client.brain:Found module 'Unclear' with words: []
DEBUG:client.brain:Found module 'Weather' with words: ['WEATHER', 'TODAY', 'TOMORROW']
INFO:apscheduler.scheduler:Scheduler started
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added
INFO:apscheduler.scheduler:Added job "Notifier.gather" to job store "default"
INFO:client.conversation:Starting to handle conversation with keyword 'JASPER'.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
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
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2017-10-05 14:12:43.897054+00:00 (in 29.969918 seconds)
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/client/conversation.py", line 31, in handleForever
threshold, transcribed = self.mic.passiveListen(self.persona)
File "/home/pi/jasper-client/client/mic.py", line 110, in passiveListen
frames_per_buffer=CHUNK)
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 750, in open
stream = Stream(self, *args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 441, in __init__
self._stream = pa.open(**arguments)
IOError: [Errno -9997] Invalid sample rate
INFO:apscheduler.scheduler:Scheduler has been shut down
If anyone can tell me how to fix this I would greatly appreciate it. Otherwise, time to find a different project.
Thanks!