Read the statement by Michael Teeuw here.
MMM-AssistantMk2 (v3)
- 
useSnowboy: true,
if you use this feature, you need to update AMk2
npm run updatetry this in AMk2 directory
and enable snowboy library (and electron rebuild for snowboy) - 
@jimmydew in the future please use the markdown for code
select the text and hit the </> icon above the editor
 - 
@Bugsounet
i got quite a few errors on the rebuild:✖ Rebuild Failed An unhandled error occurred inside electron-rebuild make: Entering directory '/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/build' CXX(target) Release/obj.target/snowboy/lib/snowboy.o In file included from /home/pi/.electron-gyp/6.1.7/include/node/v8-internal.h:14, from /home/pi/.electron-gyp/6.1.7/include/node/v8.h:25, from /home/pi/.electron-gyp/6.1.7/include/node/node.h:63, from ../../../nan/nan.h:56, from ../lib/snowboy.cc:1: /home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations] declarator __attribute__((deprecated(message))) ^ /home/pi/.electron-gyp/6.1.7/include/node/v8.h:8205:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’ V8_DEPRECATE_SOON("Use *WithData version.", ^~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations] declarator __attribute__((deprecated(message))) ^ /home/pi/.electron-gyp/6.1.7/include/node/v8.h:8214:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’ V8_DEPRECATE_SOON("Use *WithData version.", ^~~~~~~~~~~~~~~~~ In file included from ../lib/snowboy.cc:1: ../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’: ../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete) ^ ../lib/snowboy.cc: In constructor ‘SnowboyDetect::SnowboyDetect(const string&, const string&)’: ../lib/snowboy.cc:38:31: warning: catching polymorphic type ‘class std::runtime_error’ by value [-Wcatch-value=] } catch (std::runtime_error e) { ^ In file included from ../../../nan/nan.h:56, from ../lib/snowboy.cc:1: ../lib/snowboy.cc: At global scope: /home/pi/.electron-gyp/6.1.7/include/node/node.h:572:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type] (node::addon_register_func) (regfunc), \ ^ /home/pi/.electron-gyp/6.1.7/include/node/node.h:606:3: note: in expansion of macro ‘NODE_MODULE_X’ NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) ^~~~~~~~~~~~~ ../lib/snowboy.cc:183:1: note: in expansion of macro ‘NODE_MODULE’ NODE_MODULE(SnowboyDetect, SnowboyDetect::Init) ^~~~~~~~~~~ In file included from /home/pi/.electron-gyp/6.1.7/include/node/node.h:63, from ../../../nan/nan.h:56, from ../lib/snowboy.cc:1: /home/pi/.electron-gyp/6.1.7/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’: /home/pi/.electron-gyp/6.1.7/include/node/node_object_wrap.h:84:78: required from here /home/pi/.electron-gyp/6.1.7/include/node/v8.h:9810:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] reinterpret_cast<Callback>(callback), type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/6.1.7/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’: ../../../nan/nan_object_wrap.h:65:61: required from here /home/pi/.electron-gyp/6.1.7/include/node/v8.h:9810:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] SOLINK_MODULE(target) Release/obj.target/snowboy.node /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status make: *** [snowboy.target.mk:143: Release/obj.target/snowboy.node] Error 1 make: Leaving directory '/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/build' 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-AssistantMk2/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Linux 5.4.35-v7l+ gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/lib/node/binding/Release/electron-v6.1-linux-arm" "--remote_path=./snowboy/v1.4.7/Release/" "--package_name=snowboy-v1.4.7-electron-v6.1-linux-arm.tar.gz" "--host=https://github.com/bugsounet/snowboy" gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy gyp ERR! node -v v10.20.1 gyp ERR! node-gyp -v v6.1.0 gyp ERR! not ok Failed with exit code: 1 Error: make: Entering directory '/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/build' CXX(target) Release/obj.target/snowboy/lib/snowboy.o In file included from /home/pi/.electron-gyp/6.1.7/include/node/v8-internal.h:14, from /home/pi/.electron-gyp/6.1.7/include/node/v8.h:25, from /home/pi/.electron-gyp/6.1.7/include/node/node.h:63, from ../../../nan/nan.h:56, from ../lib/snowboy.cc:1: /home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations] declarator __attribute__((deprecated(message))) ^ /home/pi/.electron-gyp/6.1.7/include/node/v8.h:8205:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’ V8_DEPRECATE_SOON("Use *WithData version.", ^~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/6.1.7/include/node/v8config.h:326:49: warning: ‘MicrotasksCompletedCallback’ is deprecated [-Wdeprecated-declarations] declarator __attribute__((deprecated(message))) ^ /home/pi/.electron-gyp/6.1.7/include/node/v8.h:8214:3: note: in expansion of macro ‘V8_DEPRECATE_SOON’ V8_DEPRECATE_SOON("Use *WithData version.", ^~~~~~~~~~~~~~~~~ In file included from ../lib/snowboy.cc:1: ../../../nan/nan.h: In function ‘void Nan::AsyncQueueWorker(Nan::AsyncWorker*)’: ../../../nan/nan.h:2294:62: warning: cast between incompatible function types from ‘void (*)(uv_work_t*)’ {aka ‘void (*)(uv_work_s*)’} to ‘uv_after_work_cb’ {aka ‘void (*)(uv_work_s*, int)’} [-Wcast-function-type] , reinterpret_cast<uv_after_work_cb>(AsyncExecuteComplete) ^ ../lib/snowboy.cc: In constructor ‘SnowboyDetect::SnowboyDetect(const string&, const string&)’: ../lib/snowboy.cc:38:31: warning: catching polymorphic type ‘class std::runtime_error’ by value [-Wcatch-value=] } catch (std::runtime_error e) { ^ In file included from ../../../nan/nan.h:56, from ../lib/snowboy.cc:1: ../lib/snowboy.cc: At global scope: /home/pi/.electron-gyp/6.1.7/include/node/node.h:572:43: warning: cast between incompatible function types from ‘void (*)(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE)’ {aka ‘void (*)(v8::Local<v8::Object>)’} to ‘node::addon_register_func’ {aka ‘void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, void*)’} [-Wcast-function-type] (node::addon_register_func) (regfunc), \ ^ /home/pi/.electron-gyp/6.1.7/include/node/node.h:606:3: note: in expansion of macro ‘NODE_MODULE_X’ NODE_MODULE_X(modname, regfunc, NULL, 0) // NOLINT (readability/null_usage) ^~~~~~~~~~~~~ ../lib/snowboy.cc:183:1: note: in expansion of macro ‘NODE_MODULE’ NODE_MODULE(SnowboyDetect, SnowboyDetect::Init) ^~~~~~~~~~~ In file included from /home/pi/.electron-gyp/6.1.7/include/node/node.h:63, from ../../../nan/nan.h:56, from ../lib/snowboy.cc:1: /home/pi/.electron-gyp/6.1.7/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = node::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)]’: /home/pi/.electron-gyp/6.1.7/include/node/node_object_wrap.h:84:78: required from here /home/pi/.electron-gyp/6.1.7/include/node/v8.h:9810:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<node::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<node::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] reinterpret_cast<Callback>(callback), type); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/pi/.electron-gyp/6.1.7/include/node/v8.h: In instantiation of ‘void v8::PersistentBase<T>::SetWeak(P*, typename v8::WeakCallbackInfo<P>::Callback, v8::WeakCallbackType) [with P = Nan::ObjectWrap; T = v8::Object; typename v8::WeakCallbackInfo<P>::Callback = void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)]’: ../../../nan/nan_object_wrap.h:65:61: required from here /home/pi/.electron-gyp/6.1.7/include/node/v8.h:9810:16: warning: cast between incompatible function types from ‘v8::WeakCallbackInfo<Nan::ObjectWrap>::Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<Nan::ObjectWrap>&)’} to ‘Callback’ {aka ‘void (*)(const v8::WeakCallbackInfo<void>&)’} [-Wcast-function-type] SOLINK_MODULE(target) Release/obj.target/snowboy.node /usr/bin/ld: cannot find -lcblas collect2: error: ld returned 1 exit status make: *** [snowboy.target.mk:143: Release/obj.target/snowboy.node] Error 1 make: Leaving directory '/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/build' 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-AssistantMk2/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Linux 5.4.35-v7l+ gyp ERR! command "/usr/bin/node" "/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/.bin/node-gyp" "rebuild" "--target=6.1.7" "--arch=arm" "--dist-url=https://www.electronjs.org/headers" "--build-from-source" "--module_name=snowboy" "--module_path=/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy/lib/node/binding/Release/electron-v6.1-linux-arm" "--remote_path=./snowboy/v1.4.7/Release/" "--package_name=snowboy-v1.4.7-electron-v6.1-linux-arm.tar.gz" "--host=https://github.com/bugsounet/snowboy" gyp ERR! cwd /home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy gyp ERR! node -v v10.20.1 gyp ERR! node-gyp -v v6.1.0 gyp ERR! not ok Failed with exit code: 1 at SafeSubscriber._error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/spawn-rx/lib/src/index.js:267:84) at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:205:16) at SafeSubscriber.error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:156:26) at Subscriber._error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:92:26) at Subscriber.error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:72:18) at MapSubscriber.Subscriber._error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:92:26) at MapSubscriber.Subscriber.error (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:72:18) at SafeSubscriber._next (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/spawn-rx/lib/src/index.js:242:65) at SafeSubscriber.__tryOrUnsub (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:205:16) at SafeSubscriber.next (/home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/rxjs/internal/Subscriber.js:143:22) > @bugsounet/snowboy@1.4.7 postinstall /home/pi/MagicMirror/modules/MMM-AssistantMk2/node_modules/@bugsounet/snowboy > tsc -p tsconfig.json + @bugsounet/snowboy@1.4.7 added 20 packages from 25 contributors and audited 315 packages in 38.481s 3 packages are looking for funding run `npm fund` for details found 6 low severity vulnerabilities run `npm audit fix` to fix them, or `npm audit` for details @bugsounet/snowboy library installed - 
@jimmydew said in MMM-AssistantMk2 (v3):
Linux 5.4.35-v7l+
ah …
and what version of gcc do you use ?
try
gcc --versionin console - 
pi@raspberrypi:~/MagicMirror $ gcc --version gcc (Raspbian 7.3.0-19) 7.3.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - 
@Bugsounet Hi, again. I managed to make my radio station list and everything works fine, just I don’t know how to stop the radio. Can you please explain me how to add a stop radio command?
Thank you - 
@jimmydew can you do this command for more informations, please ?
cat /etc/*release@electros :
Good job !For stop radio (and other A2D module), i create a feature in AMk2 (A2D Server part)
You can define your preferedstopcommand
by default it’sstopbut … it’s depend of your language !
for exemple in french language, when i saystop, google transcriptstoppeyou have an exemple in AMk2 structure sample
 - 
@Bugsounet OK I understand that but if I configure that “stop” in english for example just I must say " jarvis stop" or “jarvis stop radio” ?
 - 
It’s depend what’s google return in transcription
for verify what it return
You have 2 solutions:- turn 
Fullscreenui , activatejarvisand saystop.
AMk2 will display in real time what it understand, so if it displaystop, it’s ok
en french it displaystoppethen i have to modifyA2DStopCommand: "stoppe", - in console and 
debugmode actived
activatejarvisand saystop.
you will see the transcription of google
transcription: { transcription: 'stoppe', done: true }, 
notes:
- if you say 
stopand method 1 or 2 result isstoptoo
noA2DStopCommandconfiguration require - stop command defined in 
A2DStopCommandstops all process of A2D :weblinks,cast,youtube,radio,photos(and MMM-FreeboxTV for french user) 
Use:
just say
jarvis(for activating) …stop(or your preferedA2DStopCommand) - turn 
 - 
@Bugsounet OK, thank you
 
