• 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.

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

Scheduled Pinned Locked Moved Troubleshooting
30 Posts 4 Posters 5.3k 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.
  • D Offline
    Doctor0ctoroc @sdetweil
    last edited by Jun 4, 2020, 10:15 PM

    @sdetweil So are the .lm and .dic files generated in real time? Like, does whatever is added to the words.json and sentences.json files propagate into the .lm and .dic files or are you saying that both the words and sentences files are the basis for generating the .lm and .dic files through the sphinx tool?

    S 1 Reply Last reply Jun 4, 2020, 10:16 PM Reply Quote 0
    • S Away
      sdetweil @Doctor0ctoroc
      last edited by Jun 4, 2020, 10:16 PM

      @Doctor0ctoroc on module startup

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Jun 4, 2020, 10:17 PM Reply Quote 0
      • S Away
        sdetweil @sdetweil
        last edited by Jun 4, 2020, 10:17 PM

        @Doctor0ctoroc module sends a message to node_helper “START”
        and then u can read the code in node_helper

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        D 1 Reply Last reply Jun 4, 2020, 10:27 PM Reply Quote 0
        • D Offline
          Doctor0ctoroc @sdetweil
          last edited by Doctor0ctoroc Jun 4, 2020, 10:29 PM Jun 4, 2020, 10:27 PM

          @sdetweil Ah, that’s fantastic. That would explain why when I changed “Hello Lucy” to “Hey Jarvis” in the Hello-Lucy.js and config file, it was added to the .dic and .lm file…I thought it was included in there from the get go (assuming the code was written to include an alternative, ‘familiar’ AI name that users might want) but all this time, it was my change of the code that put it in there - and it totally works when I say “Hey Jarvis” instead of “Hello Lucy”!

          So there’s no need to even edit the .lm or .dic files directly then?

          S M 3 Replies Last reply Jun 4, 2020, 10:44 PM Reply Quote 0
          • S Away
            sdetweil @Doctor0ctoroc
            last edited by Jun 4, 2020, 10:44 PM

            @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
            • M Offline
              Mykle1 Project Sponsor Module Developer @Doctor0ctoroc
              last edited by Jun 5, 2020, 1:30 AM

              @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
              • M Offline
                Mykle1 Project Sponsor Module Developer
                last edited by Jun 5, 2020, 1:51 AM

                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
                • M Offline
                  Mykle1 Project Sponsor Module Developer @Doctor0ctoroc
                  last edited by Jun 5, 2020, 2:14 AM

                  @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

                  D 1 Reply Last reply Jun 5, 2020, 4:51 AM Reply Quote 0
                  • D Offline
                    Doctor0ctoroc @Mykle1
                    last edited by Jun 5, 2020, 4:51 AM

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

                    M 1 Reply Last reply Jun 5, 2020, 10:52 AM Reply Quote 0
                    • M Offline
                      Mykle1 Project Sponsor Module Developer @Doctor0ctoroc
                      last edited by Jun 5, 2020, 10:52 AM

                      @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

                      D 1 Reply Last reply Jun 5, 2020, 9:14 PM Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 2 / 3
                      2 / 3
                      • First post
                        11/30
                        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