Please read the release notes carefully since this update requires adjustments to your Raspberry Pi configuration!
Also a birthday present for the girl!
Over the last three months I also built a magic mirror. But I thought some voice activated controls would be neat. You can check it all out on Youtube:
It was fun and I did learn a lot (I didn’t know any programming language before, now I know at least some basics of Python).
If you plan to build your own mirror, I do have one very important tip for you: never underestimate the space cables will take up!! This gave me a lot of headaches when I was finally assembling everything. The small wooden “box” under the mirror houses the pi (almost not enough space) and the microphone (old USB-camera) but i planned to also put the power cords in there - no way! So, when you plan your own, allow for a lot of space for cables and such. Also, measure how much space the Pi takes up with all the cables connected!
Anyway, have fun! And please do tell me what you think of my version of the Magic Mirror!
jfi1310 last edited by
How did you realize the voice control?
@jfi1310 it’s the voice control by Steven Hickson. You can set up the commands to execute your own Python scripts easy enough. I had some trouble getting it to work in the beginning, because Google changed something in their API (most notably the mp3 now has to be mono, if I remember correctly). With a bit of googling you’ll get it to run for sure. Have a look here:
@ecco-mirror What voice commands are you using if you don’t mind me asking?
@Mitchfarino not completely sure what you mean by that. It`s all there in the video. First you have to say “echo” every time (hence the name “ecco!” which is Italien, because Amazon already stole the name echo, even though it would fit a magic talking mirror much better. If you don’t know what I mean, look up the Nymph Echo on Wikipedia, you’ll get it!). After the response it is checking for several commands. Some of them have to be precise, others not. For example “how is the weather today” or “what will the weather today be like” will result in the same response. That is because in Steven Hicksons voice command script you can choose to set a ~ in front of the command. This will set off the command even if this word (or combination of words) is just a part of the request. So some examples are:
~weather today: if the request has these words in them, it will execute my weather.py script
~rain today: if the request has these words in them, it will execute my weather2.py script
~next tram: if the request has these words in them, it will execute my fahrplan.py script
Others have to be precise, like the radio control:
Playstation 3: this will give the command for mpc to play the third entry in the playlist (It’s the brands name because the voice recognition is very good recognising this, it never recognises “play station”, always “Playstation”)
And then there’s the Wiki script. Basically when you put the Wiki command first, everyting after taht will be parsed to my wiki.py script. This script is then in a first step deciding if it should look at Wikipedia or Wikidata. If It’s Wikidata, it will further dissect the sentence in three parts: Which item are you requesting (in the demo video “Berlin”), which property (“population”) and then words that help getting what you want. This has all to do with syntax. If you are interested in that script I might be able to upload it somewhere. But be warned - it is VERY messy. Prior to this I never had any programming experience.
I hope, this answers your question. If not - let me know!