I have been working on my own server implementation and I want to share it with you.
I created this project because I am very interested in robotics, home automation & voice control and I want to create an environment in which I can combine these three things. I stumbled upon Snips a while ago, and purchased a speaker kit for it. But by the time I was ready to start using it, Snips shut down (at least the open source part did).
On the Snips website I read some messages about Rhasspy and I decided to try it. It works great, but I decided that I would like to make any code that I create for handling Intents platform independent. That’s where this project comes in.
The code in my project is a framework for handling intents. It does a number of things:
- Sets up an HTTP server which receives Intents from Rhasspy
- Adds an abstraction between Rhasspy and the code that handles the intents. Because of that, it should be possible to use the IntentHandlers which are created based on this project with other software like Rhasspy.
- Automatically updates Rhasspy with the latest Sentences & Slots when the server is started. This is for people (like me) who want to actively develop their IntentHandlers, and don’t want to have to manually update the Sentences & Slots in Rhasspy all the time when they make a code change.To be able to do this, this project uses IntentDefinitions. IntentDefinitions are created in code, and are broken down into Sentences & Slots. For now only quite basic IntentDefinitions can be created. In the future I want to be able to support quite complicated sentences like the ones used in Rhasspy can tell you the weather (at least if you speak German)
- Enables the use of multiple speakers, so you can choose on which device your voice assistant answers you. For me personally, I want my voice assistant to be able to answer me on my Sonos speaker, so I built support for that.
The code can be found here:
I added some documentation to the code. It could probably be improved. I might extend the readme with some examples.
There is quite an extensive set of tests though, so that will help anyone who wants to make some changes.
I hope someone else finds it useful. I decided to put it under the MIT license, so you are free to use it for whatever you want. Just let me know when you build something cool with it!
I will add some features to it. I really want to use those weather intents that Daenara made (Rhasspy can tell you the weather (at least if you speak German)) in my home, and in my server, so expanding the IntentDefinitions is probably the first goal.