@strawberry-3.141 i feel so stupid :facepalm:
Read the statement by Michael Teeuw here.
Posts made by dogfeet
-
RE: MMM-voice
@strawberry-3.141 yes i did modify mmm-voice.js to suit my needs. to explain, i have a total of 5 commands. “fall” is the first mode and is native to the voice module, under which i have 2 commands, “asleep” and “wake up”. so i say “hey mirror” (my listen command), then “fall asleep” and it cuts out the monitor, then since it’s already in “fall” mode i just say “wake up” and it turns the display back on. the final commands are for the compliments module and they are “how do” (the mode) and “i look” which is where i’m having problems. fall asleep and wake up are working perfectly.
so yes, i modified the lines that you highlighted such that the 2 places where it used to say ‘VOICE’ it now says ‘FALL’.
should i not have done that? it seems to work. i had to make other minor changes of course to keep it working. -
RE: MMM-voice
@strawberry-3.141 thanks. i put the log command in like so…
notificationReceived: function (notification, payload, sender) { // 1. register module console.log(notification, payload); if(notification === "ALL_MODULES_STARTED"){ this.sendNotification("REGISTER_VOICE_MODULE", { mode: "HOW DO", sentences: [ "I LOOK" ] }); } // 2. react on command if(notification === "VOICE_HOW DO" && sender.name === "MMM-voice"){ if(/(LOOK)/g.test(payload)){ this.hide(1000); this.updateDom(300); // unhide the module, // set a 10 sec timeout // hide your module } } }
so i ran this with npm start dev and found this at the bottom of the console tab…
it looks like it’s recognizing the command belongs to the compliments module, but the text isn’t exactly as you described. is this correct? -
RE: MMM-voice
@strawberry-3.141 thanks so much for replying. i’ve been tackling it for a while, and yes i had read that documentation file several times but i’m such a noob that i didn’t even know what file to put that code into. you’re correct that what’s easy for some is difficult for me.
in any case, i’ve got your code implemented and after some trial and error, it’s somewhat functional. i’m able to successfully go back and forth between 2 modes that i’ve set, one of which is the “how do” mode. now, when i say “i look” it’s recognized by the mirror but it doesn’t seem to be executing any code. i’m taking this in baby steps as i learn how to make changes so i’m trying just to simply hide the compliments module. i have the following code which i think should hide the module but it doesn’t hide.
notificationReceived: function (notification, payload, sender) { // 1. register module if(notification === "ALL_MODULES_STARTED"){ this.sendNotification("REGISTER_VOICE_MODULE", { mode: "HOW DO", sentences: [ "I LOOK" ] }); } // 2. react on command if(notification === "VOICE_HOW DO" && sender.name === "MMM-voice"){ if(/(LOOK)/g.test(payload)){ this.hide(1000); this.updateDom(300); // unhide the module, // set a 10 sec timeout // hide your module } } }
i’m sorry for needing this spoon-fed to me, i have been trying, but i’m stuck on this.
-
RE: MMM-voice
hi guys, i’m a little over my head here, really not familiar with coding very much but i’ve got voice working and been able to tweak a few things.
what i want to do is probably very easy but i just can’t get it to work. i want to have mmm-voice control the default compliments module such that compliments begins hidden by default and i can say “how do i look” and the mirror will show the compliments module for 10 seconds then hide it again.
i could change the compliments to have appropriate responses and then when the user says “how do i look” the mirror will appear to answer them.
i was thinking of setting “HOW DO” as the mode command to control the compliments module and then “I LOOK” could be the command within that mode to show a compliment for 10 seconds.
what do you think? is this a simple task?
-
RE: Voice control question
@maxbachmann said in Voice control question:
I will get my microphone During this Week And then will Start To Look into a combination of Magic Mirror And snips
Snips seems To Be pretty Nice because
They allow offline sprechen recognition (I just don’t like big tech companies to Listen To me)
And in Addition Support more complex commands aswell
They use MQTT As Communication which should Be possible To Integrator into MagicMirror with The MQTT module quite easilythat sounds promising. displaying wiki info, google image searches, and youtube videos would add so much functionality. your kid could ask the mirror for a picture of snow white, you could ask it what an echidna looks like, you could tell it to play the beatles and go clean the house to some music, you could ask it albert eistein’s bio from wikipedia and it would display it. i would use that stuff all the time, and the show-off factor would be through the roof.
-
RE: Voice control question
hello-lucy looks like a great starting place. thorough explanation of how to integrate voice control into other modules. but it’s like you say, only preset commands.
the closest i could find to live searches is this guy’s project, https://medium.com/zenturtle/building-an-intelligent-voice-controlled-mirror-2edbc7d62c9e . he has it displaying wikipedia and wolfram info on command. but it looks like he has that data coming from an a local server and displaying on the mirror, so not really feasible if i’m giving the mirror away.
i think it just isn’t possible to ask the mirror to show me a picture of a giraffe, or to play me some led zeppelin or something. i had just assumed from the start that there would be such a module, it seems the natural progression of the project given the newfound popularity of devices like google home or amazon echo that do similar things without a display.
the mirror-mirror-on-the-wall module does indicate youtube functionality in the description, but i get jammed up on the credit card thing. i feel like i’m so close to the ideal solution i can taste it.
-
Voice control question
so i admit, i’m a total noob with pi and with linux in general. having said that, i’ve managed to install some 3rd party modules and configure them to suit my needs. but what i was hoping for is the wow factor that comes from voice commands.
ideally, i would be able to command the mirror to show me a picture of something or play a song or a video. but i keep running into problems before i even begin. i plan to give the mirror away as a gift, so credit card registered accounts for voice recognition are not acceptable. there are 8 voice control modules listed in the github, they are as follows:
assistant - this seems to require payment for google speech, or at least, credit card info.
hello mirror - this seems to only send voice commands to other modules… i don’t understand what to do with this
mirrormirroronthewall - this has everything i want, except that it requires credit card for alexa access
tts - this is just text-to-speech, not what i’m looking for
voice control - this only does sleep/wake by default. could i use this to display images or video somehow? i don’t know how to make it interact with other modules.
voice - same as above, i really have no clue where to even begin making this show pictures/videos from the web
magic mirror voice - the readme is describing major bugs with displaying and electron versions, etc. and claims to have low configurability, doesn’t sound like it’s for me
voicecontrol - the readme is so short, i don’t even understand what this module does.so that’s all of them. none of them seems to be what i need, except the ones that need credit cards. since i plan to give the mirror as a gift, i can’t have it tied to my credit card in any way. is there any other option out there to let me wake/sleep the mirror and display images/videos and play songs on voice command? can one of the above modules be configured to do what i want it to do with no need for payment account registration?
any help would be appreciated. i’m sorry if i’m asking about things i could just search for. but i’ve spent so many hours reading up on this one thing and i’m just chasing my own tail, getting nowhere.
-
RE: Modifying Magic Mirror for a gift...
step 3 of this tutorial https://forum.magicmirror.builders/topic/236/complete-setup-tutorial/6 describes the process for stopping the screen blanking. hopefully that solves that problem for you.
as for the update notice, are you referring to the display alert in the top bar? you can simply remove the call for that module in your config.js file and then it wont display that header at all.
this is a snippet of the default contents of config.js
modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { module: "clock", position: "top_left" },
you can delete the module call altogether or comment it out with /* */ symbols like so…
modules: [ { module: "alert", }, /* { module: "updatenotification", position: "top_bar" }, */ { module: "clock", position: "top_left" },