I have been working for some time on an implementation of Home Assistant that I can send commands via text message, wake word detection, speech to text via wake word, and API.AI integration with the speech to text. I tried using AlexaPi and Snips directly. However, I was unhappy with the results.
I also tried using the Jasper Project as it is normally, but there were limitations that I was not happy with. For one, Pocketsphinx is handy for wake word. However, beyond that it wasn’t that great at handling the commands. The normal Google Speech API with Jasper worked well, but I was limited to 50 queries per day which I quickly used up. I ended up forking a version of Jasper and modifying it to use Microsoft Bing Speech API and send all recognized text to API.AI. I also have modified the way TTS is processed on my Raspberry Pi as a whole. I wanted a simple way to send TTS commands both from HA as well as other apps. I would have used the internal notify, but it was easier to go this route. My main complaint was I wanted the voice to match no matter what it was doing. My initial configuration using the notify command had an Amazon Polly voice, but I couldn’t get AlexaPi or Jasper to work seamlessly. When different components had different voices, it didn’t appear to be one solution.
You can find my configuration here, as well as instructions on how to set it up from scratch.
If you are just interested in the STT (speech to text) part, look here:
I would still look at the root project README to see how to implement it.
If you are just interested in the SMS commands portion, look here:
Same as above though, reading the root project README will help you get it going.
This is a work in progress, any feedback or questions are always welcome.
I did finally get the rounding to work, it didn’t work for some reason but it appeared to be something with my float. Sometimes it worked, sometimes it didn’t. I think the float wasn’t working the original way I coded it. When the sensors reported back in whole numbers, it would have worked fine.
It took me some time to wrap my head around the code, since I have Home Assistant running on another computer, but having a box that just listens and forwards the input to api.ai is basically all that is needed. Only downside I found was getting it to work with german language input (you need to put a de-DE.po file into ai/locale) and the lack of hotword detection instead of having it listen all the time (snowboy would be great) but these are rather small issues for now.
Thank you!