Closed ccurran689 closed 8 years ago
Looks like your Audio configuration isn't what Jasper expects. What's the output of aplay -l
?
pi@jasper:~/jasper $ aplay -l \ Liste des Périphériques Matériels PLAYBACK ** carte 1: ALSA [bcm2835 ALSA], périphérique 0: bcm2835 ALSA [bcm2835 ALSA] Sous-périphériques: 8/8 Sous-périphérique #0: subdevice #0 Sous-périphérique #1: subdevice #1 Sous-périphérique #2: subdevice #2 Sous-périphérique #3: subdevice #3 Sous-périphérique #4: subdevice #4 Sous-périphérique #5: subdevice #5 Sous-périphérique #6: subdevice #6 Sous-périphérique #7: subdevice #7 carte 1: ALSA [bcm2835 ALSA], périphérique 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] Sous-périphériques: 1/1 Sous-périphérique #0: subdevice #0
What is odd; is I have the same issue; and I am using hardware I have used before. Just reinstalling...
aplay works, I can record/playback audio no problem. I have verified that my .asoundrc is selecting the correct device. The mic works, but the speaker doesnt.
This is what I am using:
http://amzn.com/B000E6IL10
Every time I start jasper it will say "How can I be of service" and then shut down before I can speak. This is the debug:
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 python import 'pocketsphinx'... DEBUG:client.diagnose:Python module 'pocketsphinx' found: '/usr/local/lib/python2.7/dist-packages/pocketsphinx.so' DEBUG:client.diagnose:Checking executable 'aplay'... DEBUG:client.diagnose:Executable 'aplay' found: '/usr/bin/aplay' DEBUG:client.diagnose:Checking executable 'espeak'... DEBUG:client.diagnose:Executable 'espeak' found: '/usr/bin/espeak' DEBUG:client.vocabcompiler:compiled_revision is 'bb74ae36d130ef20de710e3a77b43424b8fa774f' 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'] DEBUG:client.vocabcompiler:compiled_revision is '8c0e66f387b7177205726ecfcb3edd9df0d23653' 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 pcm_dmix.c:1018:(snd_pcm_dmix_open) unable to open slave ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream ALSA lib pcm_dmix.c:1018:(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 INFO:client.mic:Initialization of PyAudio completed. DEBUG:client.tts:Saying 'How can I be of service, Charles?' with 'espeak-tts' DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 100 -w /tmp/tmprogybk.wav 'How can I be of service, Charles?' DEBUG:client.tts:Executing aplay -D plughw:1,0 /tmp/tmprogybk.wav DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmprogybk.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono ' 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 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1968 Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2643 Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2767 Traceback (most recent call last): File "/home/pi/jasper/jasper.py", line 148, in
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/pymodules/python2.7/pyaudio.py", line 714, in open
stream = Stream(self, _args, *_kwargs)
File "/usr/lib/pymodules/python2.7/pyaudio.py", line 396, in init
self._stream = pa.open(**arguments)
IOError: [Errno Invalid sample rate] -9997
INFO:apscheduler.scheduler:Scheduler has been shut down