jasperproject / jasper-client

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

IOError: [Errno Unanticipated host error] -9999 #551

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi, I use a raspberry pi 2 and installed Jasper according to these instructions: https://github.com/GeoBeBee/mySystem/blob/master/Jasper-dev_onPocketPhinx_5preAlpha.txt

Everything went fine until the last step. When I try to execute, the following happens:

~/jasper/jasper-client $ ./Jasper.py --debug
*******************************************************
*             JASPER - THE TALKING COMPUTER           *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
DEBUG:jasper.application:Trying to read config file: '/home/pi/.jasper/profile.yml'
WARNING:jasper.application:language not specified in profile, using 'en-US'
INFO:jasper.application:audio_engine not specified in profile, using defaults.
DEBUG:jasper.application:Using Audio engine 'pyaudio'
DEBUG:jasper.application:Using STT engine 'sphinx'
DEBUG:jasper.application:Using passive STT engine 'sphinx'
DEBUG:jasper.application:Using TTS engine 'google-tts'
INFO:jasper.application:Using keyword 'Jasper'
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/birthday
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/birthday/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: birthday 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/mpdcontrol
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/mpdcontrol/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: mpdcontrol 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/gmail
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/gmail/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: gmail 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/weather
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/weather/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: weather 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/hackernews
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/hackernews/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: hn 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/news
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/news/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: news 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/notifications
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/notifications/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: notifications 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/joke
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/joke/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: joke 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/life
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/life/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: life 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/unclear
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/unclear/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: unclear 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/speechhandler/clock
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/speechhandler/clock/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: clock 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/stt/witai-stt
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/stt/witai-stt/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: witai-stt 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/stt/pocketsphinx-stt
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/stt/pocketsphinx-stt/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: sphinx 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/stt/google-stt
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/stt/google-stt/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: google 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/stt/att-stt
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/stt/att-stt/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: att-stt 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/stt/julius-stt
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/stt/julius-stt/plugin.info' parsed successfully!
DEBUG:jasper.diagnose:Checking executable 'julius'...
DEBUG:jasper.diagnose:Executable 'julius' not found
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/stt/julius-stt' skipped! (Reason: Can't find julius executable)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/stt/julius-stt/__init__.py", line 2, in <module>
    from .julius import JuliusSTTPlugin
  File "/home/pi/jasper/jasper-client/plugins/stt/julius-stt/julius.py", line 10, in <module>
    raise ImportError("Can't find julius executable")
ImportError: Can't find julius executable
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/stt/kaldigstserver-stt
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/stt/kaldigstserver-stt/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: kaldigstserver-stt 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/mary-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/mary-tts/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: mary-tts 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/festival-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/festival-tts/plugin.info' parsed successfully!
DEBUG:jasper.diagnose:Checking executable 'text2wave'...
DEBUG:jasper.diagnose:Executable 'text2wave' not found
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/tts/festival-tts' skipped! (Reason: Executables "text2wave" and/or  "festival" not found!)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/tts/festival-tts/__init__.py", line 2, in <module>
    from .festival import FestivalTTSPlugin
  File "/home/pi/jasper/jasper-client/plugins/tts/festival-tts/festival.py", line 10, in <module>
    raise ImportError('Executables "text2wave" and/or  "festival" not found!')
ImportError: Executables "text2wave" and/or  "festival" not found!
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/osx-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/osx-tts/plugin.info' parsed successfully!
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/tts/osx-tts' skipped! (Reason: Invalid platform!)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/tts/osx-tts/__init__.py", line 2, in <module>
    from .osx import MacOSXTTSPlugin
  File "/home/pi/jasper/jasper-client/plugins/tts/osx-tts/osx.py", line 13, in <module>
    raise ImportError('Invalid platform!')
ImportError: Invalid platform!
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/ivona-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/ivona-tts/plugin.info' parsed successfully!
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/tts/ivona-tts' skipped! (Reason: No module named pyvona)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/tts/ivona-tts/__init__.py", line 2, in <module>
    from .ivona import IvonaTTSPlugin
  File "/home/pi/jasper/jasper-client/plugins/tts/ivona-tts/ivona.py", line 4, in <module>
    import pyvona
ImportError: No module named pyvona
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/cereproc-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/cereproc-tts/plugin.info' parsed successfully!
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/tts/cereproc-tts' skipped! (Reason: No module named suds)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/tts/cereproc-tts/__init__.py", line 2, in <module>
    from .cereproc import CereprocTTSPlugin
  File "/home/pi/jasper/jasper-client/plugins/tts/cereproc-tts/cereproc.py", line 3, in <module>
    import suds
ImportError: No module named suds
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/flite-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/flite-tts/plugin.info' parsed successfully!
DEBUG:jasper.diagnose:Checking executable 'flite'...
DEBUG:jasper.diagnose:Executable 'flite' not found
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/tts/flite-tts' skipped! (Reason: Executable 'flite' not found!)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/tts/flite-tts/__init__.py", line 2, in <module>
    from .flite import FliteTTSPlugin
  File "/home/pi/jasper/jasper-client/plugins/tts/flite-tts/flite.py", line 12, in <module>
    raise ImportError("Executable '%s' not found!" % EXECUTABLE)
ImportError: Executable 'flite' not found!
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/pico-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/pico-tts/plugin.info' parsed successfully!
DEBUG:jasper.diagnose:Checking executable 'pico2wave'...
DEBUG:jasper.diagnose:Executable 'pico2wave' not found
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/tts/pico-tts' skipped! (Reason: Executable 'pico2wave' not found!)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/tts/pico-tts/__init__.py", line 2, in <module>
    from .pico import PicoTTSPlugin
  File "/home/pi/jasper/jasper-client/plugins/tts/pico-tts/pico.py", line 13, in <module>
    raise ImportError("Executable '%s' not found!" % EXECUTABLE)
ImportError: Executable 'pico2wave' not found!
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/google-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/google-tts/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: google-tts 1.0.0
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/mstranslator-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/mstranslator-tts/plugin.info' parsed successfully!
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/tts/mstranslator-tts' skipped! (Reason: No module named mstranslator)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/tts/mstranslator-tts/__init__.py", line 2, in <module>
    from .plugin import MicrosoftTranslatorTTSPlugin
  File "/home/pi/jasper/jasper-client/plugins/tts/mstranslator-tts/plugin.py", line 2, in <module>
    import mstranslator
ImportError: No module named mstranslator
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/tts/espeak-tts
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/tts/espeak-tts/plugin.info' parsed successfully!
DEBUG:jasper.diagnose:Checking executable 'espeak'...
DEBUG:jasper.diagnose:Executable 'espeak' not found
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/tts/espeak-tts' skipped! (Reason: espeak executable not found!)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/tts/espeak-tts/__init__.py", line 2, in <module>
    from .espeak import EspeakTTSPlugin
  File "/home/pi/jasper/jasper-client/plugins/tts/espeak-tts/espeak.py", line 11, in <module>
    raise ImportError("espeak executable not found!")
ImportError: espeak executable not found!
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/audioengine/alsa-ae
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/audioengine/alsa-ae/plugin.info' parsed successfully!
WARNING:jasper.pluginstore:Plugin at '/home/pi/jasper/jasper-client/plugins/audioengine/alsa-ae' skipped! (Reason: No module named alsaaudio)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 156, in detect_plugins
    plugin_info = self.parse_plugin(root)
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 195, in parse_plugin
    self._categories_map.values())
  File "/home/pi/jasper/jasper-client/jasper/pluginstore.py", line 51, in parse_plugin_class
    ("py", "r", imp.PKG_DIRECTORY))
  File "/home/pi/jasper/jasper-client/plugins/audioengine/alsa-ae/__init__.py", line 2, in <module>
    from .alsaaudioengine import AlsaAudioEnginePlugin
  File "/home/pi/jasper/jasper-client/plugins/audioengine/alsa-ae/alsaaudioengine.py", line 4, in <module>
    import alsaaudio
ImportError: No module named alsaaudio
DEBUG:jasper.pluginstore:Found plugin candidate at: /home/pi/jasper/jasper-client/plugins/audioengine/pyaudio-ae
DEBUG:jasper.pluginstore:Plugin info file '/home/pi/jasper/jasper-client/plugins/audioengine/pyaudio-ae/plugin.info' parsed successfully!
DEBUG:jasper.pluginstore:Found valid plugin: pyaudio 1.0.0
INFO:pyaudio_1_0_0.pyaudioengine:Initializing PyAudio. ALSA/Jack error messages that pop up during this process are normal and can usually be safely ignored.
ALSA lib pcm_dsnoop.c:618:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.USB-Audio.pcm.front.1:CARD=1'
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.USB-Audio.pcm.surround51.1:CARD=1'
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.USB-Audio.pcm.surround51.1:CARD=1'
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.USB-Audio.pcm.surround40.1:CARD=1'
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.USB-Audio.pcm.surround51.1:CARD=1'
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.USB-Audio.pcm.surround51.1:CARD=1'
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.USB-Audio.pcm.surround51.1:CARD=1'
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.USB-Audio.pcm.surround71.1:CARD=1'
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.USB-Audio.pcm.iec958.1:CARD=1,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.USB-Audio.pcm.iec958.1:CARD=1,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.USB-Audio.pcm.iec958.1:CARD=1,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 pcm_dmix.c:961:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:557:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dmix.c:1022:(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:pyaudio_1_0_0.pyaudioengine:Initialization of PyAudio engine finished
DEBUG:pyaudio_1_0_0.pyaudioengine:Found 8 PyAudio devices
WARNING:jasper.application:input_device not specified in profile, defaulting to 'default' (Possible values: sound-blaster-tactic-3d-alpha-usb-audio, snd-card, dsnooper, duplex, default)
DEBUG:pyaudio_1_0_0.pyaudioengine:Found 8 PyAudio devices
DEBUG:pyaudio_1_0_0.pyaudioengine:Found 8 PyAudio devices
WARNING:jasper.application:output_device not specified in profile, defaulting to 'default' (Possible values: bcm2835-alsa-hw-00, bcm2835-alsa-iec958-hdmi, sound-blaster-tactic-3d-alpha-usb-audio, snd-card, dmixer, duplex, default)
DEBUG:pyaudio_1_0_0.pyaudioengine:Found 8 PyAudio devices
WARNING:jasper.application:Plugin 'weather' skipped! (Reason: Weather location not configured!)
Traceback (most recent call last):
  File "/home/pi/jasper/jasper-client/jasper/application.py", line 179, in __init__
    plugin = info.plugin_class(info, self.config)
  File "/home/pi/jasper/jasper-client/plugins/speechhandler/weather/weather.py", line 151, in __init__
    raise ValueError('Weather location not configured!')
ValueError: Weather location not configured!
WARNING:sphinx_1_0_0.sphinxplugin:This STT plugin doesn't have multilanguage support!
DEBUG:jasper.vocabcompiler:compiled_revision is 'ba6c824f7e47fa242905db670de140697319bf85'
DEBUG:sphinx_1_0_0.sphinxplugin:Initializing PocketSphinx Decoder with hmm_dir '/usr/local/share/pocketsphinx/model/en-us/hub4wsj_sc_8k'
WARNING:sphinx_1_0_0.sphinxplugin:This STT plugin doesn't have multilanguage support!
DEBUG:jasper.vocabcompiler:compiled_revision is '891385e59d82ee79cdc0f7a74fc6bd2281fe675c'
DEBUG:sphinx_1_0_0.sphinxplugin:Initializing PocketSphinx Decoder with hmm_dir '/usr/local/share/pocketsphinx/model/en-us/hub4wsj_sc_8k'
DEBUG:jasper.mic:input_samplerate not configured, using default.
DEBUG:jasper.mic:input_samplewidth not configured, using default.
DEBUG:jasper.mic:input_channels not configured, using default.
DEBUG:jasper.mic:input_chunksize not configured, using default.
DEBUG:jasper.mic:output_chunksize not configured, using default.
DEBUG:jasper.mic:output_padding not configured,using default.
DEBUG:jasper.mic:Input sample rate: 16000 Hz
DEBUG:jasper.mic:Input sample width: 16 bit
DEBUG:jasper.mic:Input channels: 1
DEBUG:jasper.mic:Input chunksize: 1024 frames
DEBUG:jasper.mic:Output chunksize: 1024 frames
DEBUG:jasper.mic:Output padding: no
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): translate.google.com
DEBUG:requests.packages.urllib3.connectionpool:"GET / HTTP/1.1" 200 None
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): translate.google.com
DEBUG:requests.packages.urllib3.connectionpool:"GET /translate_tts?textlen=33&idx=0&q=How+can+I+be+of+service%2C+Andreas%3F&tl=en-us&client=tw-ob&tk=149400.294212&total=1&ie=UTF-8 HTTP/1.1" 200 11328
DEBUG:pyaudio_1_0_0.pyaudioengine:output stream opened on device 'default' (24000 Hz, 1 channel, 32 bit)
DEBUG:pyaudio_1_0_0.pyaudioengine:output stream closed on device 'default'
DEBUG:jasper.conversation:Starting to handle conversation.
INFO:jasper.mic:Waiting for keyword 'Jasper'...
Expression 'alsa_snd_pcm_hw_params_set_rate_near( pcm, hwParams, &setRate, NULL )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 3201
Expression 'paUnanticipatedHostError' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2053
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 "./Jasper.py", line 5, in <module>
    jasper.main()
  File "/home/pi/jasper/jasper-client/jasper/__main__.py", line 55, in main
    app.run()
  File "/home/pi/jasper/jasper-client/jasper/application.py", line 251, in run
    self.conversation.handleForever()
  File "/home/pi/jasper/jasper-client/jasper/conversation.py", line 40, in handleForever
    input = self.mic.listen()
  File "/home/pi/jasper/jasper-client/jasper/mic.py", line 190, in listen
    self.wait_for_keyword(self._keyword)
  File "/home/pi/jasper/jasper-client/jasper/mic.py", line 150, in wait_for_keyword
    self._input_rate):
  File "/home/pi/jasper/jasper-client/plugins/audioengine/pyaudio-ae/pyaudioengine.py", line 175, in record
    output=False) as stream:
  File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "/home/pi/jasper/jasper-client/plugins/audioengine/pyaudio-ae/pyaudioengine.py", line 161, in open_stream
    stream = self._engine._pyaudio.open(**stream_kwargs)
  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
    stream = Stream(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
    self._stream = pa.open(**arguments)
IOError: [Errno Unanticipated host error] -9999

I guess you might be interested in my alsa config. Here is my /etc/asound.conf:

pcm.snd_card {
        type hw
        card 1
}

ctl.snd_card {
        type hw
        card 1
}

pcm.dmixer {
    type dmix
    ipc_key 1024
    ipc_perm 0666
    slave.pcm "snd_card"
    slave {
        period_time 0
        period_size 1024
        buffer_size 8192
        rate 44100
        channels 2
    }
    bindings {
        0 0
        1 1
    }
}

ctl.dmixer {
  type hw
  card 1
}

pcm.dsnooper {
    type dsnoop
    ipc_key 2048
    ipc_perm 0666 
    slave.pcm "snd_card"
    slave 
    {
        period_time 125011
        period_size 5513
        buffer_size 22056
        format "S16_LE"
        rate 44100
        channels 2
    }
    bindings {
        0 0
        1 0
    }
}

pcm.duplex {
    type asym
    playback.pcm "dmixer"
    capture.pcm "dsnooper"
}

pcm.!default {
    type plug
    slave.pcm "duplex"
}

ctl.!default {
    type hw
    card 1
}

I hope, you can help me fix this error. arecord and aplay work fine. If you need the output of any other commands, please let me know and I will provide.

Thanks in advance, Andreas

ghost commented 8 years ago

I've found a workaround. However, it's not that nice...

So, I tried executing the following script, receiving the exact same error as above:

import pyaudio
import wave

CHUNK = 1024
FORMAT = pyaudio.paInt16
CHANNELS = 1
RATE = 16000
RECORD_SECONDS = 5
WAVE_OUTPUT_FILENAME = "output.wav"

p = pyaudio.PyAudio()

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

print("* recording")

frames = []

for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
    data = stream.read(CHUNK)
    frames.append(data)

print("* done recording")

stream.stop_stream()
stream.close()
p.terminate()

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()

However, when I changed RATE to other values like 24000 it worked and created a correct output file.

Therefore, I added

audio:
    input_samplerate: 24000

to my ~/.jasper/profile.yml. Now it does not crash anymore.

This is very strange, because arecord -f cd -r 16000 -t wav -d 5 -c 1 works like a charm and also

>>> import pyaudio
>>> _pyaudio = pyaudio.PyAudio()
>>> _pyaudio.get_device_info_by_index(15)["name"]
u'default'
>>> _pyaudio.is_format_supported(input_device=15, rate=16000, input_channels=1, input_format=8)
True
ghost commented 8 years ago

After wondering why recognition does not work at all, I stumbled across #552. Works perfectly fine now :-)

Without this fix, it recognizes really random things.