Microphone and Speech Recognition issues
Most of these issues can be fixed by following the following:
- Have you installed all necessary dependencies?
- Is your microphone configured correctly?
- Have you enabled billing in Google Speech Platform?
If you've done these and are still having issues I would recommend running
npm start dev and seeing what (if any) error you get after you say "smart mirror".
If saying "smart mirror" does nothing or you see a light glowing on the bottom but no other command works:
There is likely an issue with Sonus. You can run it from the
smart-mirror directory with:
npm run sonus
Testing Speech Using Sonus
When you start Sonus in the terminal, you will see this:
$ npm run sonus > email@example.com sonus /home/bmartin/smart-mirror > node sonus.js █
When you see the blinking cursor, this means that Sonus is listening. Now you would say the command, "smart mirror, show me how to tie a bow tie" You're results should be similar to this:
!h: 1 !p: show !p: show me !p: show me a !p: show me how !p: show me how to !p: show !p: show me !p: show me how to !p: show me how to !f: show me how to tie a bow tie
Let's break these results down
Confirming the Hotword is Detected.
When you say "smart mirror" if you've installed all dependencies correctly, trained your model, and configured the Speech Settings correctly on the Remote ConfigUI. You should get a
!h: 1 response. This is saying that the hotword was detected correctly. If you have more than one hotword you'll get a response
!h: x where
x is the index number of the hotword specified in the Remote ConfigUI.
If you don't see anything displayed when saying "smart mirror" then the most common issues are:
~/.asoundrcisn't configured properly. Follow steps to configure sound here.
- Personal Model file (commonly named
smart_mirror.pmdl) is missing from the
smart-mirrorfolder, or isn't entered correctly on Remote ConfigUI. This file can be named anything you would like as long as there's no spaces, and it is correctly entered on Remote ConfigUI. Follow Steps for Speech Settings here.
- Personal Model isn't trained. Follow steps for training your own model here.
- Dependencies aren't properly installed. follow steps here.
Confirming Google Speech API is configured correctly.
Assuming you're getting a response that the hotword is detected. You then would say the command. In our example above that command is "show me how to tie a bow tie". While the audio is streaming to Google Speech API you will get partial results. This is shown in the examples starting with
!p: followed by the partial transcribed result. After it has completed transcribing the command a final results response is received. This is shown in the examples starting with
!f: followed by the final transcribed result. If you're getting partial and final results, then speech recognition is working for you.
If you see the response for the hotword, but no partial or final results, then the most common issues are:
- Google Cloud Speech API key JSON file (commonly named
keyfile.jsonis missing from the
smart-mirrorfolder, or isn't entered correctly on Remote ConfigUI. The
keyfile.jsonfile can be named anything you would like as long as it has no spaces, and it is correctly entered on Remote ConfigUI. Follow Steps for Speech Settings here.
- Billing is either not enabled, project is not attached to the billing account, or billing account is closed within the Google Cloud Platform. Follow the steps for configuring voice here.
Still having issues? Check out recent audio related issues on GitHub.
Also, we're available on discord chat to help assist you in real time.