Read the statement by Michael Teeuw here.
MMM-Hotword (v2) - whole-new-built
-
@smarthome
With onlynotificationExecof MMM-Hotword, you can send only one notification.
There are 2 solutions.- Use
MMM-NotificationTrigger, it can fire several notifications at a time by one trigger. - You can use
moduleExecto call inner methods directly.
moduleExec: { module: [], exec: (module) => { if (module.name == "MMM-Page-Selector") { module.notificationRecieved("PAGE_SELECT", 1) } if (module.name == "MMM-AssistantMk2") { module.notificationRecieved("ASSISTANT_SAY", "Open News Page") } } }(not tested code, but you can catch the concept. You can use
sendNotificationfrom sender module instead usingnotificationReceivedof target module)PS AMK2 has some TTS-like feature(ASSISTANT_SAY) but I recommend you to use dedicated TTS modules like MMM-TTS or MMM-GoogleTTS.
- Use
-
@Sean
1/Could you give me the code in MMM Notification Trigger2/Your code with ModuleExec didn’t work
3/I’m considering to use MMM TTS/Google TTS, but woud like to l try the simple solution first
-
{ module: "MMM-NotificationTrigger", config: { triggers:[ { trigger: "PAGE_SELECT_1", fires: [ { fire: "PAGE_SELECT", payload: (pl) => {return 1} }, { fire: "ASSISTANT_SAY", payload: (pl) => {return "ASSISTANT_SAY"} } ] } ] } },PAGE_SELECT_1from notificationExec of Hotword. -
@Sean
Your notification code didn’t work. Nothing happen :(
Could you check it again, plspayload: (payload) => { //OPTIONAL. transform received payload to what your target module wants.You mean that: MMM Notification transform only, can not modify the payload then transform?
-
@smarthome
Well, check the log. and tell me whether suspicious logs be there.fire: "PAGE_SELECT", payload: (pl) => {return 1}is equivalent to
.sendNotification("PAGE_SELECT", 1). whateverplwould come, it will be transfomed(or modified, whatever you want to call) and the fired notification would have1as payload. -
@Sean
Finally, it worked, many thank for your help! -
@Sean
I created some hotwords by myself on https://snowboy.kitt.ai/ under .pmdl extension, then save to model folder in MMM Hotword
After configure MMM-Hotword in MMM config file to use these hotwords, MMM-Hotword auto detect hotwords and do the action, why no input voice signal to mic, only noise…
I tried to incrase hotword from 1 word to 2 words, one to multiple syllables, but cant not stop this issuse
I’ve check the configuration, everthing is normal.
What’s happen? How to fix that?Tks!
-
@smarthome
Did you usetrainer.shof the module to make your pmdl? or made it on snowboy website? pmdl is somewhat sensitive so, if you made it on another platform (e.g. your desktop pc) or other device(e.g different mic with your RPI’s), it might not work.
Anyway, How do you figure out `only noise? -
@Sean
I have built two hot words like this to call each page. I call the first page works, but by the time I call the second page is not working? Please point out the error and help me!


-
@guongthongminh
Well, you don’t need to useMMM-NotificationTrigger. I can’t understand why you use that. MMM-Hotword itself has the feature of emitting notification(You’re already using.){ fire: "HOTWORD_RESUME", }, { fire: "HOTWORD_PAUSE", }It doesn’t make any sense at all. This means “HOTWORD_RESUME” and “HOTWORD_PAUSE” at a same time. Why this part be needed? This would make your MMM-Hotword being paused.
