Read the statement by Michael Teeuw here.
Need help for testing modules
-
@Sean said in Need help for testing modules:
f the help from people could make me gain concentration again. So please test this module and report issues on Github.
Nice @Sean ! I wrote a basic Google Assistant module https://github.com/gauravsacc/MMM-GoogleAssistant a while back and haven’t had time to implement all the features I wanted to. If you look at the readme you can tell i had the same ideas as you :) Happy to help test!
-
@gauravsacc Frankly, start of this module was stimulated by your module. ;)
-
Running into the following errors installing the module.
pi@raspberrypi:~/MagicMirror/modules/MMM-Assistant $ npm install --save-dev electron-rebuild && ./node_modules/.bin/electron-rebuild --pre-gyp-fix MMM-TelegramBot@1.0.0 /home/pi/MagicMirror/modules/MMM-Assistant └── electron-rebuild@1.6.0 npm WARN MMM-TelegramBot@1.0.0 No repository field. npm WARN MMM-TelegramBot@1.0.0 No license field. ✖ Rebuild Failed An unhandled error occurred inside electron-rebuild gyp info it worked if it ends with ok gyp info using node-gyp@3.6.2 gyp info using node@6.11.3 | linux | arm gyp http GET https://atom.io/download/electron/v1.7.8/iojs-v1.7.8.tar.gz gyp http 200 https://atom.io/download/electron/v1.7.8/iojs-v1.7.8.tar.gz gyp http GET https://atom.io/download/electron/v1.7.8/SHASUMS256.txt gyp http 200 https://atom.io/download/electron/v1.7.8/SHASUMS256.txt gyp info spawn /usr/bin/python2 gyp info spawn args [ '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/.electron-gyp/.node-gyp/iojs-1.7.8/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/home/pi/.electron-gyp/.node-gyp/iojs-1.7.8', gyp info spawn args '-Dnode_gyp_dir=/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/home/pi/.electron-gyp/.node-gyp/iojs-1.7.8/(target_arch)/iojs.lib', gyp info spawn args '-Dmodule_root_dir=/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy/build' CXX(target) Release/obj.target/snowboy/swig/Node/snowboy.o SOLINK_MODULE(target) Release/obj.target/snowboy.node /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status snowboy.target.mk:130: recipe for target 'Release/obj.target/snowboy.node' failed make: Leaving directory '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy/build' make: *** [Release/obj.target/snowboy.node] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12) gyp ERR! System Linux 4.9.41-v7+ gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/.bin/node-gyp" "rebuild" "--target=1.7.8" "--arch=arm" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy/lib/node/binding/Release/electron-v1.7-linux-arm" "--remote_path=./snowboy/v1.2.0/Release/" "--package_name=snowboy-v1.2.0-electron-v1.7-linux-arm.tar.gz" "--host=https://snowboy-release-node.s3-us-west-2.amazonaws.com" gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy gyp ERR! node -v v6.11.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok Failed with exit code: 1 Error: gyp info it worked if it ends with ok gyp info using node-gyp@3.6.2 gyp info using node@6.11.3 | linux | arm gyp http GET https://atom.io/download/electron/v1.7.8/iojs-v1.7.8.tar.gz gyp http 200 https://atom.io/download/electron/v1.7.8/iojs-v1.7.8.tar.gz gyp http GET https://atom.io/download/electron/v1.7.8/SHASUMS256.txt gyp http 200 https://atom.io/download/electron/v1.7.8/SHASUMS256.txt gyp info spawn /usr/bin/python2 gyp info spawn args [ '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/node-gyp/gyp/gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'make', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy/build/config.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/node-gyp/addon.gypi', gyp info spawn args '-I', gyp info spawn args '/home/pi/.electron-gyp/.node-gyp/iojs-1.7.8/common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=/home/pi/.electron-gyp/.node-gyp/iojs-1.7.8', gyp info spawn args '-Dnode_gyp_dir=/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/node-gyp', gyp info spawn args '-Dnode_lib_file=/home/pi/.electron-gyp/.node-gyp/iojs-1.7.8/(target_arch)/iojs.lib', gyp info spawn args '-Dmodule_root_dir=/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'build', gyp info spawn args '-Goutput_dir=.' ] gyp info spawn make gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ] make: Entering directory '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy/build' CXX(target) Release/obj.target/snowboy/swig/Node/snowboy.o SOLINK_MODULE(target) Release/obj.target/snowboy.node /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status snowboy.target.mk:130: recipe for target 'Release/obj.target/snowboy.node' failed make: Leaving directory '/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy/build' make: *** [Release/obj.target/snowboy.node] Error 1 gyp ERR! build error gyp ERR! stack Error: `make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/node-gyp/lib/build.js:258:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:219:12) gyp ERR! System Linux 4.9.41-v7+ gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/.bin/node-gyp" "rebuild" "--target=1.7.8" "--arch=arm" "--dist-url=https://atom.io/download/electron" "--build-from-source" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy/lib/node/binding/Release/electron-v1.7-linux-arm" "--remote_path=./snowboy/v1.2.0/Release/" "--package_name=snowboy-v1.2.0-electron-v1.7-linux-arm.tar.gz" "--host=https://snowboy-release-node.s3-us-west-2.amazonaws.com" gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/snowboy gyp ERR! node -v v6.11.3 gyp ERR! node-gyp -v v3.6.2 gyp ERR! not ok Failed with exit code: 1 at SafeSubscriber._error (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/spawn-rx/lib/src/index.js:267:84) at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/rxjs/Subscriber.js:238:16) at SafeSubscriber.error (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/rxjs/Subscriber.js:197:26) at Subscriber._error (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/rxjs/Subscriber.js:128:26) at Subscriber.error (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/rxjs/Subscriber.js:102:18) at MapSubscriber.Subscriber._error (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/rxjs/Subscriber.js:128:26) at MapSubscriber.Subscriber.error (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/rxjs/Subscriber.js:102:18) at SafeSubscriber._next (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/spawn-rx/lib/src/index.js:241:65) at SafeSubscriber.__tryOrSetError (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/rxjs/Subscriber.js:247:16) at SafeSubscriber.next (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/rxjs/Subscriber.js:187:27)
Solution was to (after going back and forth for hours) install the following.
sudo apt-get install libatlas-base-dev
Right now it seems to be installing, still at 2% but will update when it’s done!
Oh, and great plugin man! :)
-
@TheOmran thanks. Maybe i missed something in manual. I’ll check and add your result to wiki. Thanks again.
-
I just starred your plugin while wandering at Github and go back to find the post at forum. I’m so excited that this plugin actually published with high level of completeness. You did a wonderful job!
-
@cxlwill Thanks for your words. I hope I could find some nice East Asian Alternatives.
-
I have been trying to make this work for a couple of days but I don’t seem to be able to achieve this. I have installed it correctly and add it to my screen, it does detect when I say “snowboy” but then it fails miserably.
This is the error it throws:0|mm | [ASSTNT] Conversation Error: Service unavailable. 0|mm | Recording 16384 bytes 0|mm | Recording 16384 bytes 0|mm | [ASSTNT] Conversation Error: { Error: Unknown Error. 0|mm | at ClientDuplexStream._emitStatusIfDone (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:201:19) 0|mm | at ClientDuplexStream._receiveStatus (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:180:8) 0|mm | at /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:649:14 0|mm | code: 2, 0|mm | metadata: Metadata { _internal_repr: { 'content-disposition': [Object] } } }
This is the configuration file
{ module: 'MMM-Assistant', position: 'bottom_left', config: { assistant: { auth: { keyFilePath: "secret.json", //When you want to change the location of this file, set this. savedTokensPath: "resources/tokens.js" //When you want to change the location of this file, set this. }, audio: { encodingIn: "LINEAR16", //Ignore this. I think you don't need to change this. sampleRateOut: 16000 //Ignore this. I think you don't need to change this. } }, snowboy: { models: [ { file: "resources/smart_mirror.pmdl", sensitivity: 0.5, hotwords : "MIRROR" //One of models should be "MIRROR" }, { file: "resources/snowboy.umdl", sensitivity: 0.5, hotwords : "ASSISTANT" //One of models should be "ASSISTANT" } ] }, record: { threshold: 0, //Ignore this. I think you don't need to change this. verbose:true, //true for checking recording status. recordProgram: 'rec', //You can use 'rec', 'sox'. But I recommend use 'arecord'. silence: 2.0 //Ignore this. I think you don't need to change this. }, stt: { auth: [{ projectId: 'magicmirror-gassistant', //ProjectId from Google Console keyFilename: 'keyfile.json' }], //You can use multi accounts for saving money. request: { encoding: 'LINEAR16', //Ignore this. I think you don't need to change this. sampleRateHertz: 16000, //Ignore this. I think you don't need to change this. languageCode: 'en-US' //See https://cloud.google.com/speech/docs/languages }, }, speak: { useAlert: true, //If you want to show the text of speech, set this true. But It could be ignored by command of modules directly. language: 'en-US', //If you want to set the default language of speech of command result, set this. }, alias: [ { "help :command" : ["teach me :command", "what is :command"] } ] // You can use aliases for difficult pronunciation or easy using. } }
Any help with this would be greatly appreciated
-
@Txukie
Have you tried changingrecordProgram
toarecord
? -
I have, it fails with another error:
[ASSTNT] Assistant Activated Recording with sample rate 16000... Recording 4000 bytes End Recording: 431.071ms Recording 12044 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes Recording 4000 bytes (node:10777) Warning: No such label 'End Recording' for console.timeEnd() [ASSTNT] Conversation Error: { Error: Received RST_STREAM with error code 0 at ClientDuplexStream._emitStatusIfDone (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:201:19) at ClientDuplexStream._receiveStatus (/home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:180:8) at /home/pi/MagicMirror/modules/MMM-Assistant/node_modules/google-assistant/node_modules/grpc/src/node/src/client.js:649:14 code: 13, metadata: Metadata { _internal_repr: {} } }
-
This post is deleted!