Jasper on Raspian Buster Software Installation Guide
I completed this install process on a Raspberry Pi Model 3 B+ using the Raspian Buster Lite ISO. I used a USB microphone and speakers that plug into the audio jack.
I also tested this on a Raspberry Pi Model 4 using Raspian Buster Lite ISO.
This install uses pocketsphinx for the speech to text and festival for text to speech. This means you aren't sharing your audio with any outside services
Burn Raspian Buster image onto SD Card
Boot the Raspian image on your Pi. Sign in to your Pi. Use raspi-config and enable the network adapter or wireless according to your needs. Also, enable SSH. Plug in your microphone and speakers. Restart your Pi.
SSH into your Pi
Run the following commands to update your Pi and install some utilities
Create an ALSA configuration file using
add the following lines to the file
Save the file and restart your Pi
SSH back into your Pi. Test your microphone and speakers. Run alsamixer
Press f6 and select usb microphone, Press F4 capture and press up arrow to increase microphone gain
Test your microphone works by recording a message. Run the arecord command, speak a test message, end with ctrl-C
Play back your recorded message
Create a .bash_profile
And add the following lines into it
Edit your .bashrc file using the following command. Scroll to the bottom of the file
And add the following lines at the end of the file
Sign out of the raspberry pi and ssh back in to have the bash scripts run
After signing back in download the jasper source using the following command
Download and apply the following patch to the Jasper source
Install needed Python libraries
Create the Jasper profile
Install PocketSphinx and the utilities we will need
Install CMUSphinx
Installing Phonetisaurus, m2m-aligner and MITLM
To use the Pocketsphinx STT engine, you also need to install MIT Language Modeling Toolkit, m2m-aligner and Phonetisaurus (and thus OpenFST)
Patch and build OpenFST.
Build m2m-aligner
Build mitlm
Build Phonetisaurus
Copy some files around
Download and build the Phonetisaurus FST model
Rename the folder for convienience
Install Festival for TTS
Edit the Jasper profile.yml
Change the profile to this. I put in x's and 1's for the private information. It should already be set to your private information from before. Specifically the lines under the pocketsphinx: and add the tts_engine: line