Open actuallytomato opened 6 years ago
By the way, I installed this from scratch on Raspbian Stretch, the newest version of Raspbian, and I used this tutorial for the install: http://www.knight-of-pi.org/raspberry-pi-3-installing-jasper-with-wit-ai-for-voice-recognition/
Just installed JASPER from scratch like you from the official documentation facing with the same or similar issues. Will keep you up to date if I can find a solution.
Im in the same situation. I think the bad request has to do with the connection between Jasper and witai. I also get a authentication problem when i try to connect, but my access-token is 100% correct. Not sure if you need to write it down as 'YOURKEY' with the apostrophe. Will update if i find a solution.
Okey guys these are the steps that fixed my problem:
"1. Enter "cd /home/pi/jasper-client/client"
This fixed all my issues. Been searching for days now but got it finally working. If you have questions, i will try to help.
Didn't try it. I formatted the disk and bought Echo :-P
./jasper/jasper.py
WARNING:root:tts_engine not specified in profile, defaulting to 'espeak-tts' ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958 ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline ALSA lib pcm.c:2266:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline 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 JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock CRITICAL:client.stt:Request failed with response: u'{\n "error" : "Bad request",\n "code" : "bad-request"\n}'
Now Getting Bad Request again and again.
Run Jasper script with --debug
flag and check the debug log for issue.
So recently I've been trying to install Jasper on my Raspberry Pi 2 B+, and I've encountered a series of errors. I'm using wit.ai as my stt, and using Svox as my tts. This is what I get when i run jasper.py or ./start.sh.
`***
WARNING:client.brain:Skipped module 'Birthday' due to an error. Traceback (most recent call last): File "/home/pi/jasper/client/brain.py", line 43, in get_modules mod = loader.load_module(name) File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module mod = imp.load_module(fullname, self.file, self.filename, self.etc) File "/home/pi/jasper/client/modules/Birthday.py", line 4, in
import facebook
ImportError: No module named facebook
WARNING:client.brain:Skipped module 'HN' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/HN.py", line 5, in
from bs4 import BeautifulSoup
ImportError: No module named bs4
WARNING:client.brain:Skipped module 'MPDControl' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/MPDControl.py", line 5, in
import mpd
ImportError: No module named mpd
WARNING:client.brain:Skipped module 'News' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/News.py", line 5, in
from semantic.numbers import NumberService
ImportError: No module named semantic.numbers
WARNING:client.brain:Skipped module 'Notifications' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/Notifications.py", line 3, in
import facebook
ImportError: No module named facebook
WARNING:client.brain:Skipped module 'Time' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/Time.py", line 5, in
from semantic.dates import DateService
ImportError: No module named semantic.dates
WARNING:client.brain:Skipped module 'Weather' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/Weather.py", line 8, in
import bs4
ImportError: No module named bs4
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1281:(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:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1281:(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:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1281:(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:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'defaults.bluealsa.device'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
WARNING:client.brain:Skipped module 'Birthday' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/Birthday.py", line 4, in
import facebook
ImportError: No module named facebook
WARNING:client.brain:Skipped module 'HN' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/HN.py", line 5, in
from bs4 import BeautifulSoup
ImportError: No module named bs4
WARNING:client.brain:Skipped module 'MPDControl' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/MPDControl.py", line 5, in
import mpd
ImportError: No module named mpd
WARNING:client.brain:Skipped module 'News' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/News.py", line 5, in
from semantic.numbers import NumberService
ImportError: No module named semantic.numbers
WARNING:client.brain:Skipped module 'Notifications' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/Notifications.py", line 3, in
import facebook
ImportError: No module named facebook
WARNING:client.brain:Skipped module 'Time' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/Time.py", line 5, in
from semantic.dates import DateService
ImportError: No module named semantic.dates
WARNING:client.brain:Skipped module 'Weather' due to an error.
Traceback (most recent call last):
File "/home/pi/jasper/client/brain.py", line 43, in get_modules
mod = loader.load_module(name)
File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module
mod = imp.load_module(fullname, self.file, self.filename, self.etc)
File "/home/pi/jasper/client/modules/Weather.py", line 8, in
import bs4
ImportError: No module named bs4
Traceback (most recent call last):
File "jasper.py", line 151, in
app.run()
File "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 179, in passiveListen
transcribed = self.passive_stt_engine.transcribe(f)
File "/home/pi/jasper/client/stt.py", line 594, in transcribe
r.raise_for_status()
File "/usr/lib/python2.7/dist-packages/requests/models.py", line 893, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://api.wit.ai/speech?v=20150101
`
If anyone know how to fix or get rid of these errors, I would greatly appreciate knowing how. Also, when I say Jasper, it recognises what im saying but it doesn't make any noises or sounds. Also the last part looks important.