jasperproject / jasper-client

Client code for Jasper voice computing platform
MIT License
4.53k stars 1.01k forks source link

"IOError: [Errno Input overflowed] -9981" #300

Open Zelaf opened 9 years ago

Zelaf commented 9 years ago

EDIT: Instead of flodding the Issue section with pointless issues that may be able to fix later I stumbled upon an issue I can't seem to fix.

"OSError: Command execution failed"

I don't know how to fix this at this point and time and I could not find any fix by googling it... please help ^^ thanks

<B+ model>

Holzhaus commented 9 years ago

Unfortunately, you need to post more output. From what I can see, I assume that you forgot to install something, so that Jasper tries to execute a file that does not exist.

Zelaf commented 9 years ago

Yhea I have a few more problems now I will post them in a few minutes

Zelaf commented 9 years ago

Okay here is try 1 I guess

pi@raspberrypi ~ $ 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: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:1018:(snd_pcm_dmix_open) unable to open slave
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
INFO:client.stt:Transcribed: ['JASPER']
INFO:client.stt:Transcribed: ['NEWS']
INFO:client.stt:Transcribed: ['YES WEATHER']
Traceback (most recent call last):
  File "jasper/jasper.py", line 143, in <module>
    app.run()
  File "jasper/jasper.py", line 113, 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 121, in passiveListen
    data = stream.read(CHUNK)
  File "/usr/lib/pymodules/python2.7/pyaudio.py", line 564, in read
    return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981
^C^Z
[1]+  Stopped                 jasper/jasper.py
Zelaf commented 9 years ago

So I ussuly get the error Input Overflowed -9981 so try 2 here I did a bit of talking and he crashed a bit afterwards

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: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:1018:(snd_pcm_dmix_open) unable to open slave
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
INFO:client.stt:Transcribed: ['WORK']
INFO:client.stt:Transcribed: ['NOW BUT']
INFO:client.stt:Transcribed: ['JASPER']
INFO:client.stt:Transcribed: ['NO']
INFO:client.stt:Transcribed: ['NOW WORK']
INFO:client.stt:Transcribed: ['JASPER']
INFO:client.stt:Transcribed: ['NO']
INFO:client.stt:Transcribed: ['JASPER']
INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['BUT']
INFO:client.stt:Transcribed: ['JASPER']
INFO:client.stt:Transcribed: ['WEATHER']
WARNING:apscheduler.scheduler:Execution of job "Notifier.gather (trigger: interval[0:00:30], next run at: 2015-02-05 20:01:12 UTC)" skipped: maximum number of running instances reached (1)
INFO:client.stt:Transcribed: ['']
INFO:client.stt:Transcribed: ['NOW WORK']
INFO:client.stt:Transcribed: ['JASPER']
INFO:client.stt:Transcribed: ['']
Traceback (most recent call last):
  File "jasper/jasper.py", line 143, in <module>
    app.run()
  File "jasper/jasper.py", line 113, 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 141, in passiveListen
    data = stream.read(CHUNK)
  File "/usr/lib/pymodules/python2.7/pyaudio.py", line 564, in read
    return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981

here is my profile.yml

carrier: [not sayin']
first_name: Zelaf
gmail_address: [secrt]
gmail_password: [dis chall be secret ;)]
last_name: [dis 2]
phone_number: [dis 3]
prefers_email: true
stt_engine: sphinx
timezone: Europe/Stockholm
Zelaf commented 9 years ago

Here is a debug just talking around in jasper in debug if you want one where i use spotify as that is a pretty big thing for me just tell me :)

pi@raspberrypi ~ $ 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 python import 'pocketsphinx'...
DEBUG:client.diagnose:Python module 'pocketsphinx' found: '/usr/local/lib/python2.7/dist-packages/pocketsphinx.so'
WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts'
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 '94318c488474b8d73cd78cf5e62674319bfcd636'
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:1018:(snd_pcm_dmix_open) unable to open slave
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
INFO:client.mic:Initialization of PyAudio completed.
DEBUG:client.tts:Saying 'How can I be of service, Zelaf?' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpAxxDbY.wav 'How can I be of service, Zelaf?'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmpAxxDbY.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpAxxDbY.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'
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2015-02-05 20:06:05.176149+00:00 (in 29.930923 seconds)
INFO:client.stt:Transcribed: ['JASPER']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Keyword 'JASPER' has been said!
DEBUG:client.conversation:Started to listen actively with threshold: 32.4
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_hi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_hi.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_lo.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_lo.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
INFO:client.stt:Transcribed: ['NO']
DEBUG:client.conversation:Stopped to listen actively with threshold: 32.4
DEBUG:client.brain:'NO' is a valid phrase for module 'Unclear'
DEBUG:client.tts:Saying 'Say that again?' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpLi3hyP.wav 'Say that again?'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmpLi3hyP.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpLi3hyP.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
DEBUG:client.brain:Handling of phrase 'NO' by module 'Unclear' completed
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['FIRST']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['JASPER']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Keyword 'JASPER' has been said!
DEBUG:client.conversation:Started to listen actively with threshold: 32.4
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_hi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_hi.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_lo.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_lo.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
INFO:client.stt:Transcribed: ['HACKER NO']
DEBUG:client.conversation:Stopped to listen actively with threshold: 32.4
DEBUG:client.brain:'HACKER NO' is a valid phrase for module 'HN'
DEBUG:client.tts:Saying 'Pulling up some stories.' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpcIEXca.wav 'Pulling up some stories.'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmpcIEXca.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpcIEXca.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
DEBUG:client.tts:Saying 'Here are some front-page articles. 1) Metaprogramming Elixir... 2) New paper claims that evolution has stopped in a bacterial species. Is it true?... 3) WikiGalaxy: Explore Wikipedia in 3D' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmp84tUMQ.wav 'Here are some front-page articles. 1) Metaprogramming Elixir... 2) New paper claims that evolution has stopped in a bacterial species. Is it true?... 3) WikiGalaxy: Explore Wikipedia in 3D'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmp84tUMQ.wav
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2015-02-05 20:06:35.176149+00:00 (in 29.989393 seconds)
INFO:apscheduler.executors.default:Running job "Notifier.gather (trigger: interval[0:00:30], next run at: 2015-02-05 20:06:35 UTC)" (scheduled at 2015-02-05 20:06:05.176149+00:00)
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmp84tUMQ.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
DEBUG:client.brain:Handling of phrase 'HACKER NO' by module 'HN' completed
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
No disturbance detected
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
DEBUG:apscheduler.scheduler:Looking for jobs to run
WARNING:apscheduler.scheduler:Execution of job "Notifier.gather (trigger: interval[0:00:30], next run at: 2015-02-05 20:06:35 UTC)" skipped: maximum number of running instances reached (1)
DEBUG:apscheduler.scheduler:Next wakeup is due at 2015-02-05 20:07:05.176149+00:00 (in 29.983298 seconds)
INFO:client.stt:Transcribed: ['JASPER']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Keyword 'JASPER' has been said!
DEBUG:client.conversation:Started to listen actively with threshold: 118.8
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_hi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_hi.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_lo.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_lo.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
INFO:client.stt:Transcribed: ['']
DEBUG:client.conversation:Stopped to listen actively with threshold: 118.8
DEBUG:client.brain:'' is a valid phrase for module 'Unclear'
DEBUG:client.tts:Saying 'I'm sorry, could you repeat that?' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmp1DaSDY.wav 'I'"'"'m sorry, could you repeat that?'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmp1DaSDY.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmp1DaSDY.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
DEBUG:client.brain:Handling of phrase '' by module 'Unclear' completed
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['JASPER']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Keyword 'JASPER' has been said!
DEBUG:client.conversation:Started to listen actively with threshold: 208.8
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_hi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_hi.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_lo.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_lo.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
INFO:client.stt:Transcribed: ['EMAIL']
DEBUG:client.conversation:Stopped to listen actively with threshold: 208.8
DEBUG:client.brain:'EMAIL' is a valid phrase for module 'Gmail'
DEBUG:client.tts:Saying 'You have 393 unread emails.' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpm6lNvx.wav 'You have 393 unread emails.'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmpm6lNvx.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpm6lNvx.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
DEBUG:client.brain:Handling of phrase 'EMAIL' by module 'Gmail' completed
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['NOW WORK']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
Traceback (most recent call last):
  File "jasper/jasper.py", line 143, in <module>
    app.run()
  File "jasper/jasper.py", line 113, 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 163, in passiveListen
    data = stream.read(CHUNK)
  File "/usr/lib/pymodules/python2.7/pyaudio.py", line 564, in read
    return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981
INFO:apscheduler.scheduler:Scheduler has been shut down
^Z
[2]+  Stopped                 jasper/jasper.py --debug

Hope you can fix it!

Zelaf commented 9 years ago

Here is one of spotify just in case

pi@raspberrypi ~ $ 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: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:1018:(snd_pcm_dmix_open) unable to open slave
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
INFO:client.stt:Transcribed: ['IS']
INFO:client.stt:Transcribed: ['JASPER']
INFO:client.stt:Transcribed: ['SPOTIFY']
WARNING:apscheduler.scheduler:Execution of job "Notifier.gather (trigger: interval[0:00:30], next run at: 2015-02-05 20:22:30 UTC)" skipped: maximum number of running instances reached (1)
ERROR:client.brain:Failed to execute module
Traceback (most recent call last):
  File "/home/pi/jasper/client/brain.py", line 73, in query
    module.handle(text, self.mic, self.profile)
  File "/home/pi/jasper/client/modules/MPDControl.py", line 47, in handle
    music_mode.handleForever()
  File "/home/pi/jasper/client/modules/MPDControl.py", line 164, in handleForever
    threshold, transcribed = self.mic.passiveListen(self.persona)
  File "/home/pi/jasper/client/mic.py", line 121, in passiveListen
    data = stream.read(CHUNK)
  File "/usr/lib/pymodules/python2.7/pyaudio.py", line 564, in read
    return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981
Exception RuntimeError: 'Set changed size during iteration' in <bound method Mic.__del__ of <client.mic.Mic instance at 0x24b9a30>> ignored
Traceback (most recent call last):
  File "jasper/jasper.py", line 143, in <module>
    app.run()
  File "jasper/jasper.py", line 113, 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 121, in passiveListen
    data = stream.read(CHUNK)
  File "/usr/lib/pymodules/python2.7/pyaudio.py", line 564, in read
    return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981
^Z
[3]+  Stopped                 jasper/jasper.py

Some diffrent errors with MPD if i dont see wrong

have i compiled this wrong or done some kind of error? it took me years to get it working O.o

also side question any sneak peak on a newer version anywhere?

Zelaf commented 9 years ago

Here is debug when trying to use spotify

pi@raspberrypi ~ $ 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 python import 'pocketsphinx'...
DEBUG:client.diagnose:Python module 'pocketsphinx' found: '/usr/local/lib/python2.7/dist-packages/pocketsphinx.so'
WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts'
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 '94318c488474b8d73cd78cf5e62674319bfcd636'
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:1018:(snd_pcm_dmix_open) unable to open slave
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
INFO:client.mic:Initialization of PyAudio completed.
DEBUG:client.tts:Saying 'How can I be of service, Zelaf?' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpaVDkmi.wav 'How can I be of service, Zelaf?'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmpaVDkmi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpaVDkmi.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'
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2015-02-05 20:34:59.391891+00:00 (in 29.922813 seconds)
INFO:client.stt:Transcribed: ['WORK']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['IS WORK']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['IS WORK']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['JASPER']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Keyword 'JASPER' has been said!
DEBUG:client.conversation:Started to listen actively with threshold: 34.2
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_hi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_hi.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_lo.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_lo.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
INFO:client.stt:Transcribed: ['']
DEBUG:client.conversation:Stopped to listen actively with threshold: 34.2
DEBUG:client.brain:'' is a valid phrase for module 'Unclear'
DEBUG:client.tts:Saying 'I'm sorry, could you repeat that?' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmp2wtd66.wav 'I'"'"'m sorry, could you repeat that?'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmp2wtd66.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmp2wtd66.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
DEBUG:client.brain:Handling of phrase '' by module 'Unclear' completed
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['NOW TIME']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['JASPER']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Keyword 'JASPER' has been said!
DEBUG:client.conversation:Started to listen actively with threshold: 39.6
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_hi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_hi.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2015-02-05 20:35:29.391891+00:00 (in 29.991391 seconds)
INFO:apscheduler.executors.default:Running job "Notifier.gather (trigger: interval[0:00:30], next run at: 2015-02-05 20:35:29 UTC)" (scheduled at 2015-02-05 20:34:59.391891+00:00)
DEBUG:client.tts:Executing aplay -D hw:1,0 /home/pi/jasper/static/audio/beep_lo.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/home/pi/jasper/static/audio/beep_lo.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
'
INFO:client.stt:Transcribed: ['SPOTIFY']
DEBUG:client.conversation:Stopped to listen actively with threshold: 39.6
DEBUG:client.brain:'SPOTIFY' is a valid phrase for module 'MPDControl'
DEBUG:MPDControl:Preparing to start music module
DEBUG:client.tts:Saying 'Please give me a moment, I'm loading your Spotify playlists.' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpLY8SMN.wav 'Please give me a moment, I'"'"'m loading your Spotify playlists.'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmpLY8SMN.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpLY8SMN.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
DEBUG:MPDControl:Starting music mode
DEBUG:client.vocabcompiler:compiled_revision is 'e2bffaf9888b90d637238639d90b803b0ee8c960'
INFO:client.mic:Initializing PyAudio. ALSA/Jack error messages that pop up during this process are normal and can usually be safely ignored.
INFO:client.mic:Initialization of PyAudio completed.
DEBUG:client.tts:Saying 'Playing Wolves by Dreamers' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpNYZR7A.wav 'Playing Wolves by Dreamers'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmpNYZR7A.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpNYZR7A.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
ERROR:client.brain:Failed to execute module
Traceback (most recent call last):
  File "/home/pi/jasper/client/brain.py", line 73, in query
    module.handle(text, self.mic, self.profile)
  File "/home/pi/jasper/client/modules/MPDControl.py", line 47, in handle
    music_mode.handleForever()
  File "/home/pi/jasper/client/modules/MPDControl.py", line 164, in handleForever
    threshold, transcribed = self.mic.passiveListen(self.persona)
  File "/home/pi/jasper/client/mic.py", line 121, in passiveListen
    data = stream.read(CHUNK)
  File "/usr/lib/pymodules/python2.7/pyaudio.py", line 564, in read
    return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981
DEBUG:client.tts:Saying 'I'm sorry. I had some trouble with that operation. Please try again later.' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpunNu5J.wav 'I'"'"'m sorry. I had some trouble with that operation. Please try again later.'
DEBUG:client.tts:Executing aplay -D hw:1,0 /tmp/tmpunNu5J.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpunNu5J.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
Exception RuntimeError: 'Set changed size during iteration' in <bound method Mic.__del__ of <client.mic.Mic instance at 0x205f8f0>> ignored
DEBUG:client.conversation:Started listening for keyword 'JASPER'
DEBUG:apscheduler.scheduler:Looking for jobs to run
WARNING:apscheduler.scheduler:Execution of job "Notifier.gather (trigger: interval[0:00:30], next run at: 2015-02-05 20:35:29 UTC)" skipped: maximum number of running instances reached (1)
DEBUG:apscheduler.scheduler:Next wakeup is due at 2015-02-05 20:35:59.391891+00:00 (in 29.978663 seconds)
INFO:client.stt:Transcribed: ['']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
Traceback (most recent call last):
  File "jasper/jasper.py", line 143, in <module>
    app.run()
  File "jasper/jasper.py", line 113, 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 121, in passiveListen
    data = stream.read(CHUNK)
  File "/usr/lib/pymodules/python2.7/pyaudio.py", line 564, in read
    return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981
INFO:apscheduler.scheduler:Scheduler has been shut down
^Z
[2]+  Stopped                 jasper/jasper.py --debug

Hope you can help me fix this with this info

Should also mention im using B+

Zelaf commented 9 years ago

Any update on this?

Holzhaus commented 9 years ago

Please comment out your gmail_address in you profile.yml and retest. If that works fine, this is the same issue as #240, which seems to be caused by some bug in the GmailNotifier.

Zelaf commented 9 years ago

Yhea i did try that but it still happends

zapinator3000 commented 9 years ago

I had the same problem until I checked my email turns out I had 10 unread emails after reading them it works fine now.

sapier commented 9 years ago

After trying to get jasper work on debian wheezy for about a day now having exactly this issue I found out it ain't a jasper issue at all. Pyaudio seems to be incapable of handling input correct if there's any delay in processing data. A phenom II at 3ghz ain't even capable of SAVING 44100 32bit 2 channel data using pyaudio. It usually bounces out after a couple of seconds. Why not use lower sample rates? Well my audio card doesn't support sample rates below 44100. I already updated to latest portaudio and pyaudio but this didn't help at all.

Quite crazy this works on pi but not on a (couple of year) pc capable of decoding hd in realtime ;-)

# code I used for testing pyaudio
import pyaudio, wave, sys

CHUNK = 1024*8
FORMAT = pyaudio.paInt32
CHANNELS = 1
RATE = 44100
RECORD_SECONDS = 10

WAVE_OUTPUT_FILENAME = 'Audio_.wav'
p = pyaudio.PyAudio()

print("default sample rate: ", p.get_device_info_by_index(0)['defaultSampleRate'])

stream = p.open(format=FORMAT,
               channels = CHANNELS,
               rate = RATE,
               input = True,
               input_device_index = 0,
               frames_per_buffer = CHUNK)

numframes = int(float(RATE) / float(CHUNK) * RECORD_SECONDS)
print("* recording frames", numframes)

frames = []

for i in range(0, numframes):
    data = stream.read(CHUNK)
    frames.append(data)
#    print("    read frame:", i)

print("* done recording")

stream.stop_stream()    # "Stop Audio Recording
stream.close()          # "Close Audio Recording
p.terminate()           # "Audio System Close

wf = wave.open(WAVE_OUTPUT_FILENAME, 'wb')
wf.setnchannels(CHANNELS)
wf.setsampwidth(p.get_sample_size(FORMAT))
wf.setframerate(RATE)
wf.writeframes(b''.join(frames))
wf.close()
ialex87 commented 8 years ago

ERROR:client.brain:Failed to execute module Traceback (most recent call last): File "/home/pi/jasper/client/brain.py", line 73, in query module.handle(text, self.mic, self.profile) File "/home/pi/jasper/client/modules/News.py", line 117, in handle handleResponse(mic.activeListen()) File "/home/pi/jasper/client/mic.py", line 199, in activeListen options = self.activeListenToAllOptions(THRESHOLD, LISTEN, MUSIC) File "/home/pi/jasper/client/mic.py", line 235, in activeListenToAllOptions data = stream.read(CHUNK) File "/usr/lib/pymodules/python2.7/pyaudio.py", line 564, in read return pa.read_stream(self._stream, num_frames) IOError: [Errno Input overflowed] -9981 InsecurePlatformWarning Expression 'ret' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1670 Expression 'AlsaOpen( &alsaApi->baseHostApiRep, params, streamDir, &self->pcm )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 1830 Expression 'PaAlsaStreamComponent_Initialize( &self->capture, alsaApi, inParams, StreamDirection_In, NULL != callback )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2092 Expression 'PaAlsaStream_Initialize( stream, alsaHostApi, inputParameters, outputParameters, sampleRate, framesPerBuffer, callback, streamFlags, userData )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2764 Traceback (most recent call last): File "./jasper.py", line 147, in app.run() File "./jasper.py", line 117, 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 Device unavailable] -9985 Exception RuntimeError: 'Set changed size during iteration' in <bound method Mic.del of <client.mic.Mic instance at 0x23baa80>> ignored

I have the same problems, I tried different sample rates, but earlier or later I get the same error. Looks like the issue is in accessing alsa at some point.

bruno1308 commented 8 years ago

I messed around sample rate and chunk size until I got it working, but as stated, sooner or later it crashes with error 'Set changed size during iteration'.

As a temporary workaround, on mic.py, I wrapped all: data = stream.read(CHUNK) around try/except blocks, so at least it doesn't stop execution.

as33ms commented 8 years ago

What I have tried so far:

jasper.py --local works fine. jasper.py crashes with Input overflowed -9981

any pointers here?

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 python import 'pocketsphinx'...
DEBUG:client.diagnose:Python module 'pocketsphinx' found: '/usr/local/lib/python2.7/dist-packages/pocketsphinx.so'
WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts'
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.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
INFO:client.mic:Initialization of PyAudio completed.
DEBUG:client.tts:Saying 'How can I be of service, Sytyke?' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpaNW9gi.wav 'How can I be of service, Sytyke?'
DEBUG:client.tts:Executing aplay -D plughw:1,0 /tmp/tmpaNW9gi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpaNW9gi.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']
WARNING:client.notifier:gmail_address or gmail_password not set in profile, Gmail notifier will not be used
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'
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:Next wakeup is due at 2016-02-29 09:56:06.294139+00:00 (in 29.953867 seconds)
No disturbance detected
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
INFO:client.stt:Transcribed: ['IT']
DEBUG:client.conversation:Stopped listening for keyword 'JASPER'
INFO:client.conversation:Nothing has been said or transcribed.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
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 151, in passiveListen
    data = stream.read(CHUNK)
  File "/usr/lib/pymodules/python2.7/pyaudio.py", line 564, in read
    return pa.read_stream(self._stream, num_frames)
IOError: [Errno Input overflowed] -9981
INFO:apscheduler.scheduler:Scheduler has been shut down
Exception RuntimeError: 'Set changed size during iteration' in <bound method Mic.__del__ of <client.mic.Mic instance at 0x1c16fa8>> ignored
as33ms commented 8 years ago

Further, even if the log says:

INFO:client.mic:Initialization of PyAudio completed.
DEBUG:client.tts:Saying 'How can I be of service, Sytyke?' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpaNW9gi.wav 'How can I be of service, Sytyke?'
DEBUG:client.tts:Executing aplay -D plughw:1,0 /tmp/tmpaNW9gi.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpaNW9gi.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono

I do not hear anything on my Logitech USB headset. (Although, aplay -l lists my device and aplay /usr/share/sounds/alsa/Front_Left.wav works fine)

as33ms commented 8 years ago

Ok, so finally, I hear jasper for the first time. This is what I had to do more:

  1. Check the output device for sysfefault for aplay -L and arecord -L
  2. Add the respective devices to /etc/asound.conf under RECORD_DEVICE_NAME and PLAYBACK_DEVICE_NAME; content at the end of this comment.
  3. Change the client/tts.py (see diff below) (I have already mentioned that I added stream.read within try/except block

DIFF:

diff --git a/client/tts.py b/client/tts.py
index dd3327f..4b07178 100644
--- a/client/tts.py
+++ b/client/tts.py
@@ -73,7 +73,7 @@ class AbstractTTSEngine(object):
     def play(self, filename):
         # FIXME: Use platform-independent audio-output here
         # See issue jasperproject/jasper-client#188
-        cmd = ['aplay', '-D', 'plughw:1,0', str(filename)]
+        cmd = ['aplay', '-D', 'plughw:0,0', str(filename)]
         self._logger.debug('Executing %s', ' '.join([pipes.quote(arg)
                                                      for arg in cmd]))
         with tempfile.TemporaryFile() as f:

Content of /etc/asound.conf

pcm.usb
{
    type hw
    card RECORD_DEVICE_NAME
}

pcm.internal
{
    type hw
    card PLAYBACK_DEVICE_NAME
}

pcm.!default
{
    type asym
    playback.pcm
    {
        type plug
        slave.pcm "internal"
    }
    capture.pcm
    {
        type plug
        slave.pcm "usb"
    }
}

ctl.!default
{
    type asym
    playback.pcm
    {
        type plug
        slave.pcm "internal"
    }
    capture.pcm
    {
        type plug
        slave.pcm "usb"
    }
}
as33ms commented 8 years ago

More additional notes: Changes I did in my previous comment still did not stop the IOError: [Errno Input overflowed] -9981 error. But at least, it came after I listened a knock-knock joke from Jasper. ;)

Holzhaus commented 8 years ago

@ashakunt Please try the jasper-dev branch and check if your problems persist.

as33ms commented 8 years ago

@Holzhaus Many thanks. I will take a look at it and let you know, possibly by tomorrow.

ToreAndreRosander commented 8 years ago

Any solutions to this error?

Harshasa commented 8 years ago

Any solution to this error guys?

pneumaticdeath commented 7 years ago

I'm also still seeing this. I believe it's a sampling rate problem.

fengjihua commented 6 years ago

change CHUNK = 4096 or 8192

joe95it commented 6 years ago

I have the same problem "IOError: [Errno Input overflowed] -9981" #300 and Someone say me to change chunk_input. First I try to modify my profile.yml in this way:

carrier: '' first_name: gmail_address: gmail_password: '' last_name: location: phone_number: '' prefers_email: false stt_engine: sphinx timezone: Europe/Rome stt_engine: sphinx pocketsphinx: fst_model: '/home/pi/jasper/phonetisaurus/g014b2b.fst' #optional hmm_dir: '/usr/local/share/pocketsphinx/model/en-us/en-us' #optional tts_engine: festival-tts keyword: 'Jasper' input_chunksize: '2048'

And it work, but the problem doesn't solve, but after (because I think that I've write it uncorrectly) I modify profile.yml in this way:

carrier: '' first_name: gmail_address: gmail_password: '' last_name: location: phone_number: '' prefers_email: false stt_engine: sphinx timezone: Europe/Rome stt_engine: sphinx pocketsphinx: fst_model: '/home/pi/jasper/phonetisaurus/g014b2b.fst' #optional hmm_dir: '/usr/local/share/pocketsphinx/model/en-us/en-us' #optional tts_engine: festival-tts keyword: 'Jasper' audio: input_chunksize: '2048'

And in this way, when I try to start jasper there is this error:

Traceback (most recent call last): File "./Jasper.py", line 5, in jasper.main() File "/home/pi/jasper/jasper-client/jasper/main.py", line 48, in main batch_file=p_args.batch_file) File "/home/pi/jasper/jasper-client/jasper/application.py", line 230, in init tts_plugin, self.config, keyword=keyword) File "/home/pi/jasper/jasper-client/jasper/mic.py", line 50, in init self._input_rate = get_config_value(config, 'input_samplerate', 16000) File "/home/pi/jasper/jasper-client/jasper/mic.py", line 24, in get_config_value value = int(config['audio'][name]) TypeError: 'NoneType' object has no attribute 'getitem'

joe95it commented 6 years ago

How can I change CHUNK = 4096 or 8192 ?