• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Also a birthday present for the girl!

Scheduled Pinned Locked Moved Show your Mirror
5 Posts 0 Posters 4.7k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    ecco mirror
    last edited by Jul 10, 2016, 5:33 PM

    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:
    https://www.youtube.com/watch?v=6tQ03_GB7LQ
    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!

    1 Reply Last reply Reply Quote 1
    • J Offline
      jfi1310
      last edited by Jul 11, 2016, 1:57 PM

      How did you realize the voice control?

      E 1 Reply Last reply Jul 11, 2016, 3:04 PM Reply Quote 0
      • E Offline
        ecco mirror @jfi1310
        last edited by Jul 11, 2016, 3:04 PM

        @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:
        http://stevenhickson.blogspot.de/2013/04/voice-control-on-raspberry-pi.html?m=1

        M 1 Reply Last reply Jul 13, 2016, 1:19 PM Reply Quote 0
        • M Offline
          Mitchfarino Module Developer @ecco mirror
          last edited by Jul 13, 2016, 1:19 PM

          @ecco-mirror What voice commands are you using if you don’t mind me asking?

          E 1 Reply Last reply Jul 13, 2016, 2:00 PM Reply Quote 0
          • E Offline
            ecco mirror @Mitchfarino
            last edited by Jul 13, 2016, 2:00 PM

            @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!

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              2/5
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy