Read the statement by Michael Teeuw here.
MMM-Hotword
-
@themc
I think possible.
WithMMM-notficationTrigger, you can overrideHOTWORD_DETECTEDnotification to any notification for any other modules.
So, If you have some module which can awake screen (I don’t know whether really that kind of module exists), it is possible.
If it doesn’t exist, hmmm. you might be able to fork this repository and modify it for that purpose. -
haha im a newbie when it comes to coding and finding the right lines but ill have a look arround to see if i can fix something up. i know xscreensaver can be turned on by the following command in terminal:
-activate Tell xscreensaver to turn on immediately (that is, blank the screen, as if the user had been idle for long enough.) The screensaver will deactivate as soon as there is any user activity, as usual.
It is useful to run this from a menu; you may wish to run it assleep 5 ; xscreensaver-command -activate
to be sure that you have time to take your hand off the mouse before the screensaver comes on. (Because if you jiggle the mouse, xscreensaver will notice, and deactivate.)so i think it should be possible to link a hotword to that line to execute it
-
@themc @myself the correct command would be
-deactivate
This tells xscreensaver to pretend that there has just been user activity. This means that if the screensaver is active (the screen is blanked), then this command will cause the screen to un-blank as if there had been keyboard or mouse activity. If the screen is locked, then the password dialog will pop up first, as usual. If the screen is not blanked, then this simulated user activity will re-start the countdown (so, issuing the -deactivate command periodically is one way to prevent the screen from blanking.) -
@themc
If you want just to useMMM-Hotwordas screensaver-awakener,
modifynode_helper.js;// add this in line 1: var exec = require('child_process').exec ... // around line 86 .on('hotword', (index, hotword, buffer)=>{ exec ("xscreensaver-command -deactivate", (err, stdout, stderr)=>{}) ... -
awesome ill try it out right away
-
@themc
Not tested. I wrote that post by your description. So I don’t know whether it works really.
But you can find a way how to work. -
Does anybody know what to edit to use custom hotwords (yes I created them in the Snowboy dashboard)?
-
@cr4z33
Go to snowboy and signup (https://snowboy.kitt.ai).
It’s better to do in your target device (Raspberry Pi)
After login, you can seecreate Hotwordbutton. click then follow instruction.
After that, you can get your personal model (.pmdl)
put that file intoMMM-Hotword/resourcesthen modify configuration.
By example, you recorded and getabracadabra.pmdl,
your configuration will besnowboy: [ { hotwords: "abracadabra", file: "resources/models/abracadabra.pmdl", sensitivity: '0.5', }, ...Then you can catch
abracadabraby your voice. -
@sean
Hmm that’s exactly what I did so either I am setting the wronghotwords:word or there’s something more needed to edit?In my case I have recorded the hotwords ‘OK Google’ and ‘Ehi Google’ and apart from the proper file name and path I set
hotwords: "okgoogle",andhotwords: "ehigoogle",.Also… can I use spaces into the quotes?
-
@cr4z33
Seehotwords:okgoogle.
okgoogleis a symbol for your voice. If MMM-Hotword detect yourokgoogle.pmdl(is file name right?), It will returnokgoogleas detection.
Then, if you want ot use that symbol as AssistantMk2 profile name to activate, modify configuration of MMM-AssistantMk2 like this.defaultProfile: "okgoogle", profiles: { "okgoogle" : { profileFile: "default.json", lang: "en-US", ...So, received “okgoogle” symbol will be used as profile name “okgoogle” with profile File “default.json”.
-
@sean
A-ha that’s the file name then?
That was my mistake because I named themok_google.pmdlandehi_google.pmdl!Thanks.
-
This post is deleted! -
Hi,
Can’t figure out why hotword detection stops on the 2nd run.
First detection is ok and GA responds as expected. I am a bit lost - any help is much appreciatedMagicMirror: 2.5.0
NodeJS: 9.11.2
npm: 6.4.1
MMM-AssistantMk2: 2.1.0I am using the full detailled config from MMM-AssistantMk2
-
@manfred
You might missed this in your MMM-AssistantMk2 configurationnotifications: {
ASSISTANT_ACTIVATED: “HOTWORD_PAUSE”,
ASSISTANT_DEACTIVATED: “HOTWORD_RESUME”,
},Or MMM-Hotword is not updated yet.
-
@sean Thank you very much!! That did the trick!
-
Hi , I can’t really use this module. I Have also done a minimal config.js with only this module but the mirror starts black (totally) and I have to reboot the RaspPi (I can’t close the Mirror)
What can I check ?
I have done correctly the installation of the module
Please help me
thanks from Italy

-
@s-monti-74
I need an error log to examine. I doubt you missed electron-rebuild step on installation. -
@sean please telle me which log I have to activate and how, thanks
-
OH, I missed electron-rebuild . thanks
I try… -
Hi,
I’m trying to install Hotword to work with the Assistant Module. I’m stuck at the install because I keep getting an error with Snowboy. What is the issue here. I’m new to this type of codind and would appreciate some help. Here are the errors.
pi@raspberrypi:~ $ cd ~/MagicMirror/modules/ pi@raspberrypi:~/MagicMirror/modules $ sudo apt-get install libmagic-dev libatlas-base-dev sox libsox-fmt-all Reading package lists... Done Building dependency tree Reading state information... Done libatlas-base-dev is already the newest version (3.10.3-1+rpi1). libmagic-dev is already the newest version (1:5.30-1+deb9u2). libsox-fmt-all is already the newest version (14.4.1-5). sox is already the newest version (14.4.1-5). The following packages were automatically installed and are no longer required: erlang-base erlang-crypto erlang-syntax-tools fonts-lato libboost-thread1.62.0 libc-ares2 libhttp-parser2.8 libqt5opengl5 libqt5scintilla2-12v5 libqt5scintilla2-l10n libqwt-qt5-6 libruby2.3 libscsynth1 libsctp1 libuv1 libyaml-0-2 nodejs-doc rake realpath ruby ruby-did-you-mean ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby2.3 rubygems-integration Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded. pi@raspberrypi:~/MagicMirror/modules $ git clone https://github.com/eouia/MMM-Hotword.git Cloning into 'MMM-Hotword'... remote: Enumerating objects: 3, done. remote: Counting objects: 100% (3/3), done. remote: Compressing objects: 100% (3/3), done. remote: Total 116 (delta 0), reused 0 (delta 0), pack-reused 113 Receiving objects: 100% (116/116), 7.93 MiB | 4.19 MiB/s, done. Resolving deltas: 100% (64/64), done. pi@raspberrypi:~/MagicMirror/modules $ cd MMM-Hotword pi@raspberrypi:~/MagicMirror/modules/MMM-Hotword $ npm install npm WARN deprecated boom@2.10.1: This version is no longer maintained. Please upgrade to the latest version. npm WARN deprecated hoek@2.16.3: This version is no longer maintained. Please upgrade to the latest version. npm WARN deprecated cryptiles@2.0.5: This version is no longer maintained. Please upgrade to the latest version. > snowboy@1.3.1 install /home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy > node-pre-gyp install --fallback-to-build node-pre-gyp ERR! Tried to download(403): https://snowboy-release-node.s3-us-west-2.amazonaws.com/snowboy/v1.3.1/Release/snowboy-v1.3.1-node-v67-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for snowboy@1.3.1 and node@11.8.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp) node-pre-gyp ERR! Tried to download(undefined): https://snowboy-release-node.s3-us-west-2.amazonaws.com/snowboy/v1.3.1/Release/snowboy-v1.3.1-node-v67-linux-arm.tar.gz node-pre-gyp ERR! Pre-built binaries not found for snowboy@1.3.1 and node@11.8.0 (node-v67 ABI, glibc) (falling back to source compile with node-gyp) internal/modules/cjs/loader.js:613 throw err; ^ Error: Cannot find module 'nan' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:611:15) at Function.Module._load (internal/modules/cjs/loader.js:537:25) at Module.require (internal/modules/cjs/loader.js:665:17) at require (internal/modules/cjs/helpers.js:20:18) at [eval]:1:1 at Script.runInThisContext (vm.js:123:20) at Object.runInThisContext (vm.js:312:38) at Object.<anonymous> ([eval]-wrapper:6:22) at Module._compile (internal/modules/cjs/loader.js:736:30) at evalScript (internal/process/execution.js:56:25) internal/modules/cjs/loader.js:613 throw err; ^ Error: Cannot find module 'nan' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:611:15) at Function.Module._load (internal/modules/cjs/loader.js:537:25) at Module.require (internal/modules/cjs/loader.js:665:17) at require (internal/modules/cjs/helpers.js:20:18) at [eval]:1:1 at Script.runInThisContext (vm.js:123:20) at Object.runInThisContext (vm.js:312:38) at Object.<anonymous> ([eval]-wrapper:6:22) at Module._compile (internal/modules/cjs/loader.js:736:30) at evalScript (internal/process/execution.js:56:25) gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gyp: Call to 'node -e "require('nan')"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp gypgyp ERR!ERR! configure error configure error gypgyp ERR!ERR! stack Error: `gyp` failed with exit code: 1 stackgyp Error: `gyp` failed with exit code: 1 ERR!gyp stack at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16) ERR!gyp stackERR! at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:345:16) stack at ChildProcess.emit (events.js:197:13) gypgyp ERR!ERR! stackstack at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12) at ChildProcess.emit (events.js:197:13) gyp ERR! stackgyp at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12) ERR! System Linux 4.14.79-v7+ gypgyp ERR! ERR!command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy/lib/node/binding/Release/node-v67-linux-arm/snowboy.node" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy/lib/node/binding/Release/node-v67-linux-arm" System Linux 4.14.79-v7+ gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy gypgyp ERR! node -vERR! v11.8.0 commandgyp "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy/lib/node/binding/Release/node-v67-linux-arm/snowboy.node" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy/lib/node/binding/Release/node-v67-linux-arm" ERR! node-gyp -v v3.8.0 gyp gyp ERR!ERR! not okcwd /home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy gyp ERR! node -v v11.8.0 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy/lib/node/binding/Release/node-v67-linux-arm/snowboy.node --module_name=snowboy --module_path=/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy/lib/node/binding/Release/node-v67-linux-arm' (1) node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:197:13) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:978:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5) node-pre-gyp ERR! System Linux 4.14.79-v7+ node-pre-gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy node-pre-gyp ERR! node -v v11.8.0 node-pre-gyp ERR! node-pre-gyp -v v0.6.39 node-pre-gyp ERR! not ok Failed to execute '/usr/bin/node /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy/lib/node/binding/Release/node-v67-linux-arm/snowboy.node --module_name=snowboy --module_path=/home/pi/MagicMirror/modules/MMM-Hotword/node_modules/snowboy/lib/node/binding/Release/node-v67-linux-arm' (1) npm WARN MMM-Hotword@1.1.0 No repository field. npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! snowboy@1.3.1 install: `node-pre-gyp install --fallback-to-build` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the snowboy@1.3.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2019-01-29T21_16_15_265Z-debug.log
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