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.

    MMM-Hotword - actions not being processed and restarting after detection

    Scheduled Pinned Locked Moved Troubleshooting
    1 Posts 1 Posters 397 Views 1 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.
    • P Offline
      pythugoras
      last edited by sdetweil

      Hi,

      massive fan of the project. I’m trying to get MMM-Hotword working with some simple off/on module commands. when I start the process using

      npm start dev
      

      I get the following output (console):

      Connecting socket for: MMM-Hotword
      [HOTWORD] MMM-Hotword starts
      Sockets connected & modules started ...
      Launching application.
      Create new calendar fetcher for url: http://www.calendarlabs.com/ical-calendar/ics/75/UK_Holidays.ics - Interval: 300000
      Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/josh.shallow%40gmail.com/private-a91aad9e61329573cb33a74704da0fb3/basic.ics - Interval: 300000
      Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/cazz.bradshaw%40gmail.com/private-4a0e201364e11e14451b7d4310a52d9b/basic.ics - Interval: 300000
      Create new news fetcher for url: http://feeds.bbci.co.uk/news/rss.xml - Interval: 300000
      model.file :  /home/pi/MagicMirror/modules/MMM-Hotword/models/smart_mirror.umdl
      modelPath :  /home/pi/MagicMirror/modules/MMM-Hotword/models
      model.file :  /home/pi/MagicMirror/modules/MMM-Hotword/models/hideall.pmdl
      modelPath :  /home/pi/MagicMirror/modules/MMM-Hotword/models
      [HOTWORD] begins.
      [HOTWORD] Detector starts listening.
      [HOTWORD] Detected: hideall
      [HOTWORD] stops.
      [HOTWORD] Final Result: { detected: true, hotword: 'hideall', file: null }
      

      My questions are:

      • is there a way to restart the HOTWORD listening process once a keyword is detected?
      • when I run not in dev mode, the actions are not processed on the screen.

      my config is set up as below:

              {   
                  module: "MMM-Hotword",
                  config: {
                      mic: {
                          recordProgram : "arecord",
                          device: "plughw:1,0"        // recording device (e.g.: "plughw:1")
                      },  
                      models: [
                          {   
                              hotwords    : "smart_mirror",
                              file        : "smart_mirror.umdl",
                              sensitivity : "0.5",
                          },
                          {
                            hotwords    : "hideall",
                            file        : "hideall.pmdl",
                            sensitivity : "0.5",
                          },
                          {
                            hotwords    : "showall",
                            file        : "showall.pmdl",
                            sensitivity : "0.5",
                          },
                      ],
                      defaultCommand: {
                          notificationExec: {
                              notification: "ASSISTANT_ACTIVATE",
                              payload: (detected, afterRecord) => {
                              return {profile:"default"}
                              }
                          },
                          afterRecordLimit:0,
                          restart:false,
                      },
                      commands: {
                          "hideall": {
                            moduleExec: {
                              module: [],
                              exec: (module) => { module.hide()}
                            }
                          },
                          "showall": {
                            moduleExec: {
                              module: [],
                              exec: (module) => { module.show()}
                            }
                          },
                      },
                      restart: true,
                      testMic: true,
                      useDisplay: true,
                      verbose: true
                  }
              }
      

      any guidance would be appreciated!

      Josh

      1 Reply Last reply Reply Quote 0

      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

      With your input, this post could be even better 💗

      Register Login
      • 1 / 1
      • 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