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.

    Creating Custom Voice Commands for Hello-Lucy...?

    Scheduled Pinned Locked Moved Troubleshooting
    30 Posts 4 Posters 6.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.
    • S Offline
      sdetweil @Doctor0ctoroc
      last edited by

      @Doctor0ctoroc no, they are generated each time the module starts

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • Mykle1M Offline
        Mykle1 Project Sponsor Module Developer @Doctor0ctoroc
        last edited by

        @Doctor0ctoroc

        I think, for your purposes, you can simply do this, although I have not tested it:

        1. In sentences.js file add your command(s). “CHEER ME UP” and “THANKS I FEEL BETTER” (MUST ALL BE CAPS)./

        2. In checkCommands.json Sample -->

        ["SHOW","COMMAND","","","true","MMM-ModuleName",""],
        ["HIDE","COMMAND","","","false","MMM-ModuleName",""],
        

        Changed to

        ["CHEER","ME","UP","","true","compliments",""],
        ["THANKS","I","FEEL","BETTER","false","compliments",""],
        

        This should now make sense to you. I used the hide/show pairs mostly because I found the success rate higher when using shorter commands. I’ve “learned” how to talk to Lucy so my success rate is pretty darn good. I know others that have struggled for success.

        Using what @sdetweil has told you and this simple format above, you should be on your way.

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer
          last edited by

          Ok, I just tested this and it works. You may find some commands work better than others. You’ll have to do some experimenting.

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • Mykle1M Offline
            Mykle1 Project Sponsor Module Developer @Doctor0ctoroc
            last edited by

            @Doctor0ctoroc said in Creating Custom Voice Commands for Hello-Lucy...?:

            when I changed “Hello Lucy” to “Hey Jarvis” in the Hello-Lucy.js

            You would only need to change it in the config entry

            Create a working config
            How to add modules

            Doctor0ctorocD 1 Reply Last reply Reply Quote 0
            • Doctor0ctorocD Offline
              Doctor0ctoroc @Mykle1
              last edited by

              @Mykle1 said in Creating Custom Voice Commands for Hello-Lucy...?:

              @Doctor0ctoroc said in Creating Custom Voice Commands for Hello-Lucy...?:

              when I changed “Hello Lucy” to “Hey Jarvis” in the Hello-Lucy.js

              You would only need to change it in the config entry

              Ah, good to know so I’m not being redundant. And thanks for the direction on the coding, that helps a lot! Do I need to add the extra words to the words.json file as well?

              Mykle1M 1 Reply Last reply Reply Quote 0
              • Mykle1M Offline
                Mykle1 Project Sponsor Module Developer @Doctor0ctoroc
                last edited by

                @Doctor0ctoroc said in Creating Custom Voice Commands for Hello-Lucy...?:

                Do I need to add the extra words to the words.json file as well?

                No sir. Re-read the instructions in my post above

                Create a working config
                How to add modules

                Doctor0ctorocD 1 Reply Last reply Reply Quote 0
                • Doctor0ctorocD Offline
                  Doctor0ctoroc @Mykle1
                  last edited by

                  @Mykle1 Okay, got it to work! Although it seems when I say “cheer me up” it will 25% of the time pull up the help menu haha. Is there a function that pulls up help if it can’t ‘understand’ the input? I can’t imagine it’s reading my voice command as “show help”!

                  Mykle1M 1 Reply Last reply Reply Quote 0
                  • Mykle1M Offline
                    Mykle1 Project Sponsor Module Developer @Doctor0ctoroc
                    last edited by

                    @Doctor0ctoroc

                    ‘False Positives’ do occur. That’s why I told you that’ some commands work better than others, you’ll have to experiment and Lucy will never be as accurate as an Amazon Echo or Google Home.’ You wanted custom commands. The longer they are (4 words) the higher the risk of false positives. Also, the Pi is hard put to handle Lucy. That’s the reason I moved on to laptop boards. Fantastic response time with non-usb microphone (3.5mm) and higher accuracy.

                    Create a working config
                    How to add modules

                    Doctor0ctorocD 1 Reply Last reply Reply Quote 0
                    • Doctor0ctorocD Offline
                      Doctor0ctoroc @Mykle1
                      last edited by Doctor0ctoroc

                      @Mykle1 Fair enough! Out of curiosity, if I were to remove all the commands that I know I won’t use, would that improve the performance by limiting the number of possible commands or is the bulk of the delay just a result of the Pi’s limited processing power? For my mic, I’ve actually been using the Respeaker 2-mic Pi Hat. Not sure how much more responsive that is than a USB mic but it definitely picks up my voice better than the $6 USB mic most people get on Amazon. With a breakout ribbon cable I can place it anywhere I want up to a foot or so from the Pi itself so it doesn’t have to seat directly on top!

                      S Mykle1M 2 Replies Last reply Reply Quote 0
                      • S Offline
                        sdetweil @Doctor0ctoroc
                        last edited by sdetweil

                        @Doctor0ctoroc no, the sphinx lib is just not that good in my opinion. i stopped using as i am spoiled by google speech reco

                        i warned about this back at the beginning

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 3 / 3
                        • First post
                          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