· pi@raspberrypi:~ $ /home/pi/jasper/jasper.py --debug
******************************************************* * 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 executable 'text2wave'... DEBUG:client.diagnose:Executable 'text2wave' found: '/usr/bin/text2wave' DEBUG:client.diagnose:Checking executable 'festival'... DEBUG:client.diagnose:Executable 'festival' found: '/usr/bin/festival' DEBUG:client.tts:Executing festival --pipe DEBUG:client.brain:Looking for modules in: '/home/pi/jasper/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 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
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 INFO:client.mic:Initialization of PyAudio completed. DEBUG:client.tts:Saying 'How can I be of service, anas?' with 'festival-tts' DEBUG:client.tts:Executing text2wave DEBUG:client.tts:Executing aplay -D plughw:1,0 /tmp/tmp7dBpZr.wav DEBUG:client.tts:Output was: 'aplay: main:722: audio open error: No such file or directory ' DEBUG:client.brain:Looking for modules in: '/home/pi/jasper/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 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 "build/bdist.linux-armv7l/egg/pyaudio.py", line 750, in open File "build/bdist.linux-armv7l/egg/pyaudio.py", line 441, in __init__ IOError: [Errno -9997] Invalid sample rate INFO:apscheduler.scheduler:Scheduler has been shut down
22:36
pi@raspberrypi:~ $ /home/pi/jasper/jasper.py --debug ******************************************************* * 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 executable 'text2wave'... DEBUG:client.diagnose:Executable 'text2wave' found: '/usr/bin/text2wave' DEBUG:client.diagnose:Checking executable 'festival'... DEBUG:client.diagnose:Executable 'festival' found: '/usr/bin/festival' DEBUG:client.tts:Executing festival --pipe DEBUG:client.brain:Looking for modules in: '/home/pi/jasper/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 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
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 INFO:client.mic:Initialization of PyAudio completed. DEBUG:client.tts:Saying 'How can I be of service, anas?' with 'festival-tts' DEBUG:client.tts:Executing text2wave DEBUG:client.tts:Executing aplay -D plughw:1,0 /tmp/tmp7dBpZr.wav DEBUG:client.tts:Output was: 'aplay: main:722: audio open error: No such file or directory ' DEBUG:client.brain:Looking for modules in: '/home/pi/jasper/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 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 "build/bdist.linux-armv7l/egg/pyaudio.py", line 750, in open File "build/bdist.linux-armv7l/egg/pyaudio.py", line 441, in __init__ IOError: [Errno -9997] Invalid sample rate INFO:apscheduler.scheduler:Scheduler has been shut down
Change the alsa.conf
by opening it with
sudo nano /usr/share/alsa/alsa.conf
and replace
- defaults.ctl.card 1
- defaults.pcm.card 1