You can run Jasper manually by typing:
python /usr/local/lib/jasper/jasper.py
Note: The location into which you’ve installed Jasper may vary by your version of Raspbian. If you get a “not found” message try:
python /home/pi/jasper/jasper.py
You can also set Jasper to run at startup:
crontab -e
And insert the following line:
@reboot python /usr/local/lib/jasper/jasper.py;
# or, depending on your installation location:
# @reboot python /home/pi/jasper/jasper.py
Save and exit. Finally, Reboot your Pi:
sudo reboot
Troubleshooting note
I ran into the following error when trying to run Jasper for the first time:
RuntimeError: hmm_dir '/usr/local/share/pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k' does not exist! Please make sure that you have set the correct hmm_dir in your profile.
To fix this, you’ll need to open up stt.py located at /usr/local/lib/jasper/client/stt.py.
vim /usr/local/lib/jasper/client/stt.py
Find the following line:
def __init__(self, vocabulary, hmm_dir="/usr/local/share/" +
"pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k"):
and change it to:
def __init__(self, vocabulary, hmm_dir="/usr/share/" +
"pocketsphinx/model/hmm/en_US/hub4wsj_sc_8k"):
You just need to remove the word “local”.