My partner and I are big Harry Potter fans. So, I decided to build a Harry Potter inspired digital assistant for our house, I call it the Hogwarts Assistant. I’m using Rhasspy for the speech recognition and intent detection. I wrote a Python service, which I refer to as the Conductor, that is responsible for handling the detected intents and doing something meaningful with them. This all runs on a Raspberry Pi 4 and leverages a Jabra Speak 510 for the microphone and speaker.
The following is a breakdown of some, but not all, of the functionality. It seems like I’m adding intents ever couple of days as we think of additional interesting things to do with our setup.
=============
Wake Word
- hogwarts: custom trained wake word. A ‘magical’ sound effect is used for the Wake and Recorded audio experience. Also, if an intent cannot be detected, quotes from the films are used to notify the user of the error.
Light Intents (using LIFX lights)
- nox: turns off the lights. A ‘magical’ sound effect is played during the transition.
- lumos: turns on the lights. A ‘magical’ sound effect is played during the transition.
- dim the the lights to (1…10): adjusts the brightness from 1-10. A ‘magical’ sound effect is played during the transition.
- its movie time: sets the lights to an optimal state for watching films.
- set the mood to (slytherin | hufflepuff | gryffindor | ravenclaw): sets the color of our lights to the corresponding house’s primary color (e.g. slytherin == green, gryffindor == red, etc…).
- mischief managed: resets the lights to their normal state.
Weather Intents (background sound effects are used for the forecast (e.g. if the forecast calls for rain, you hear rain in the background while the forecast is being read))
- what’s the (1…7) day forecast: reports the N day forecast.
- what’s the (monday | tuesday | wednesday | thursday | friday | saturday | sunday) (weather | forecast): reports forecast for a specific day of week.
- what’s it like outside: reports current conditions.
Chromecast Intents
- stop video: stops current media.
- (play | pause) video: pause/play current media.
Misc Spell Intents
- expecto patronum: temporarily pulses the house lights to mimic a patronus charm
- (avada kedavra | crucio | imperio): since these are unforgivable curses, the user is warned to not use them. The warning pulls from a random set of humorous responses.
Misc Intents
- (what did you say | say that again | can you repeat that | repeat that): Conductor re-runs the previous response.
News Intents
- what’s the [muggle] news: Plays the latest hourly NPR audio stream. An intro is played first, indicating that NPR is the Daily Prophet’s muggle affiliate.
- what’s the magical news: Reads a random article from the Daily Prophet fan fiction website (https://thedailyprophet.net/).
Calendar/Time Intents (clock ticking background effects are played when handling a calendar / time intents)
- when is it: get the current date and time.
- what time is it: gets the current time.
- what day is it: gets the current day.
Joke Intents
- tell me a joke: tells a random Harry Potter related joke.
Routine Intents (the Conductor can define more complex ‘routines’ which may perform a series of operations)
- good morning: sets the lights to their normal state, tells you good morning (from a random set of phrases), optionally inserts some Harry Potter inspired humor into the good morning (from a random set of phrases), tells you the current weather forecast and wishes you a good day (from a random set of phrases).
- good night: dims the house lights and wishes you good night and healthy sleep (from a random set of phrases and optionally inserting some Harry Potter inspired humor)
=============
I don’t have any videos to share that demonstrates our setup but I can create some samples if there is interest. Stay creative everyone!