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:
Testing Speech Using Sonus
When you start Sonus in the terminal, you will see this:
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:
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:
~/.asoundrc
isn't configured properly. Follow steps to configure sound here.Personal Model file (commonly named
smart_mirror.pmdl
) is missing from thesmart-mirror
folder, 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.json
is missing from thesmart-mirror
folder, or isn't entered correctly on Remote ConfigUI. Thekeyfile.json
file 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.
Last updated