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

MMM-Hotword Listening, but not doing

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 3 Posters 1.2k Views 3 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.
  • N Offline
    nakedrabbit
    last edited by sdetweil Nov 3, 2019, 5:24 AM Nov 3, 2019, 4:43 AM

    Re: MMM-Hotword
    Hello, and hopefully hello to Sean, if you see this.

    I have Hotword installed with MMM-AssistantMk2 on the latest build of MM2 (2.90), running on an RPi3. Everything except Hotword is running great! At one point, before upgrading everything, I had all this working fine, but now my pm2 logs show

    0|mm  | [HOTWORD] Detector starts listening.
    0|mm  | [HOTWORD] Final Result: { detected: false }
    0|mm  | [HOTWORD] begins.
    

    over and over in a loop… No attempt on my part gets it to recognize anything. I even removed all modules except Hotword (and the clock so I’d know it was running) and I get the same results.

    I have deinstalled and reinstalled Hotword via the automatic script And the manual method. Installation appears to be fine, and components are there. Using this config:

    {
    			module: "MMM-Hotword",
    			config: {
    				chimeOnFinish:"resources/dong.wav",
    				mic: {
    				  recordProgram : "arecord",  
    				  device        : "plughw:0",
    				},
    				models: [
    				  {
    					hotwords    : "smart_mirror",
    					file        : "smart_mirror.umdl",
    					sensitivity : "0.5",
    				  },
    				],
    				defaultCommand: {
    				  notificationExec: {
    					notification: "ASSISTANT_ACTIVATE",
    					payload: (detected, afterRecord) => {
    					  return {profile:"default"}
    					}
    				  },
    				  afterRecordLimit:0,
    				  restart:false,
    				},
    			  },
    		},
    

    The line for “device : “plughw:0”,” is because I’m using the Google HAT and mic/speakers/etc. That’s not the issue, I don’t think, because the HAT has worked fine in the past with Hotword.

    Please tell me I’m an idiot and that this is an easy fix I’m just not seeing right now.

    Thanks, and thanks to Sean for all the good work on this module!

    ? 1 Reply Last reply Nov 3, 2019, 1:00 PM Reply Quote 0
    • ? Offline
      A Former User @nakedrabbit
      last edited by Nov 3, 2019, 1:00 PM

      @nakedrabbit
      There is an issue about HAT.
      Usually, VOICE HAT is a 2-in-1 kit, so commonly the same device name is assigned to mic and speaker. It would be not the issue at all in usual usage. People can record-then-play by turns.

      My modules are working like this;

      1. Opening Mic and Recording
      2. After time or silence, closing the mic
      3. Some processing
      4. Opening the Speaker
      5. Streaming output to the speaker
      6. After time or EOS, closing the speaker
      7. repeat the whole process

      Ideally, the HAT should have no issue with my module, but…
      Physically Step 2. (closing Mic) could take some time to finish closing. (not predictable)
      So, sometimes Step 2. will be started before but ended after step 4. With separated Mic and Speaker, It will not be the problem at all.
      But with the HAT, This could be an issue. Closing Device:0(mic) is ended after Opening Device:0(speaker) and it will make Re-closing Device:0(speaker). Vice versa would be same.

      Suggestion

      • give different device names to the mic and speaker.

      As far as I know, it could be done by ALSA configuration. However, I’m not that kind of expert so cannot give you exact instruction or example. sorry.

      N 1 Reply Last reply Nov 3, 2019, 6:39 PM Reply Quote 0
      • N Offline
        nakedrabbit @Guest
        last edited by Nov 3, 2019, 6:39 PM

        @Sean
        VERY interesting!

        FWIW, there was NO issue with HAT previously! That’s why I thought it would be OK going forward with it. Dammit, I should have left well enough alone and not upgraded! Too late now, everything’s changed!

        I don’t know enough about ALSA to fight my way out of a wet paper bag. But it is worth figuring out, because I’m not the only one who picked up a cheap HAT for $5 and figured it would work - the form factor is nice.

        So I guess I’ll take this on and report back when I work it out. OR blow it off, connect some externals and get my Mirror done. Either way, thanks so much for the suggestion!

        K ? 2 Replies Last reply Nov 25, 2019, 8:22 PM Reply Quote 0
        • K Offline
          Keith @nakedrabbit
          last edited by Nov 25, 2019, 8:22 PM

          @nakedrabbit I have the same issue I think but I’m using an all-in one PC and its internal sound card. Every once in a while, it stops processing and gets into a loop like you’ve shown above

          1 Reply Last reply Reply Quote 0
          • ? Offline
            A Former User @nakedrabbit
            last edited by Nov 26, 2019, 9:58 AM

            @nakedrabbit
            I’ll launch AMK2 ver 3. in a few weeks. (I hope. I have not enough time nowadays). In that version, this annoying dependency for sound output will be deprecated, so you may use your HAT without issue. Wait a while and sorry again for your inconvenience.

            1 Reply Last reply Reply Quote 0
            • 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