MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

MMM-Hotword is open all the time, passing it all to Mk2



  • Hi all,

    My MMM-Hotword seems to react to any sound, what ever I say. I don’t even need to say the magic word but still it passes whatever is said to Assistant Mk2 - you can imagine that creates results when the TV is on (!).

    I assume I can edit the sensitivity, but still - why react to what ever is said? I assumed if the magic word is not spoken, it doesn’t open the channel and pass the voice to Mk2 ?

    Can anybody explain why this happen, and how to ‘fix’ ?


  • Module Developer

    @thestigh
    If sensitivity was set wrongly, It might have possibility of not-distinguishing pattern of your voice. Too high sensitivity for model would make hard to catch your hotword, Too low sensitivity for model would make indistinction between hotwords and similar words.
    Anyway, this issue about voice model and sensitivity is related to your environment of real usage , there is no silver bullet for common cases. Each case is different with others. So you need to optimize values of them to fit to your environment by yourself. Try many values and find optimized values for you.


  • Module Developer

    @thestigh
    Show me your current configuration of Hotword and Mk2



  • Hi @sean, when copying the config, I noticed the sensitivity for hotword “johnyjohny” was 6.0 rather than 0.6 (which I edited here), but still, would it accept any word outside the hotwords with sensitivity set so wrongly?

    (PS; removed some brackets so don’t mind them missing)

    		module: "MMM-Hotword",
    		config: {
    			snowboy: [  
    			  {
    				hotwords: "johnyjohny",
    				file: "resources/models/JohnyJohny.pmdl",
    				sensitivity: '0.6',
    			  },
    			  {
    				hotwords: "smartmirror", //this will be sended to other module for distinguishing which hotword is detected.
    				file: "resources/models/smart_mirror.umdl",
    				sensitivity: '0.5',
    			  },
    			  {
    				hotwords: "snowboy",
    				file: "resources/models/snowboy.umdl",
    				sensitivity: '0.5',
    			  },
    			  {
    				file: 'resources/models/jarvis.umdl',
    				sensitivity: '0.8,0.80',
    				hotwords: ['jarvis','jarvis'] //Kitt.ai changed their Jarvis UMDL, it has 2 models in one file. So weird.
    				//anyway, you can give different name for each. ['jarvis_1', 'jarvis_2']. Even though I think this is useless.
    			  }
    			],
    			record: {
    			  sampleRate    : 16000,      // audio sample rate
    			  threshold     : 0.5,        // silence threshold (rec only)
    			  thresholdStart: null,       // silence threshold to start recording, overrides threshold (rec only)
    			  thresholdEnd  : null,       // silence threshold to end recording, overrides threshold (rec only)
    			  silence       : 1.0,        // seconds of silence before ending
    			  verbose       : false,      // log info to the console
    
    			recordProgram: "arecord",  
    			device: "plughw:1",	
    			},
    			autostart: true,
    			autorestart: false,
    			testMic: false, //If set as true, You can test whether Mic device is working properly.
    			notifications: {
    			  PAUSE: "HOTWORD_PAUSE",
    			  RESUME: "HOTWORD_RESUME",
    			  LISTENING : "HOTWORD_LISTENING",
    			  SLEEPING : "HOTWORD_SLEEPING",
    			  ERROR : "HOTWORD_ERROR",
    			},
    			onDetected: {
    			  notification: (payload) => {
    				return "ASSISTANT_ACTIVATE"
    			  },
    			  payload: (payload) => {
    				return payload
    			  }
    
    
    		module: "MMM-AssistantMk2",
    		position: "top_center",
    		config: {
    			useWelcomeMessage: "Hey boss",
    			notifications: {
    			  ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
    			  ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
    				},

  • Module Developer

    @thestigh
    If sensitivity was set wrongly, It might have possibility of not-distinguishing pattern of your voice. Too high sensitivity for model would make hard to catch your hotword, Too low sensitivity for model would make indistinction between hotwords and similar words.
    Anyway, this issue about voice model and sensitivity is related to your environment of real usage , there is no silver bullet for common cases. Each case is different with others. So you need to optimize values of them to fit to your environment by yourself. Try many values and find optimized values for you.


Log in to reply