Read the statement by Michael Teeuw here.
MMM-AssistantMk2 (v3)
-
@electros said in MMM-AssistantMk2 (v3):
I think I should look for another microphone, the assistant doesn’t really understand what I’m saying
One possible solution for mic
Working on getting a good hardware solution for MMM-AssistantMK2
-
@Serge Thank you for the link i was looking for a solution like that.
-
Hey everyone, I have a problem with the MMM-assistantMk2:
The Icon is showing on the mirror, when i click on it in VNC it activates,and works. but it doesnt activate by my voice on the mirror.
any ideas? these are my configs:var config = { address: "localhost", // Address to listen on, can be: // - "localhost", "127.0.0.1", "::1" to listen on loopback interface // - another specific IPv4/6 to listen on a specific interface // - "0.0.0.0", "::" to listen on any interface // Default, when address config is left out or empty, is "localhost" port: 8080, ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"], // Set [] to allow all IP addresses // or add a specific IPv4 of 192.168.1.5 : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.1.5"], // or IPv4 range of 192.168.3.0 --> 192.168.3.15 use CIDR format : // ["127.0.0.1", "::ffff:127.0.0.1", "::1", "::ffff:192.168.3.0/28"], useHttps: false, // Support HTTPS or not, default "false" will use HTTP httpsPrivateKey: "", // HTTPS private key path, only require when useHttps is true httpsCertificate: "", // HTTPS Certificate path, only require when useHttps is true language: "en", timeFormat: 24, units: "metric", // serverOnly: true/false/"local" , // local for armv6l processors, default // starts serveronly and then starts chrome browser // false, default for all NON-armv6l devices // true, force serveronly mode, because you want to.. no UI on this device modules: [ { module: "clock", position: "top_left" }, { module: "calendar", header: "US Holidays", position: "top_left", config: { calendars: [ { symbol: "calendar-check", url: "webcal://www.calendarlabs.com/ical-calendar/ics/76/US_Holidays.ics" } ] } }, { module: "compliments", position: "lower_third" }, { module: "currentweather", position: "top_right", config: { location: "New York", locationID: "", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "YOUR_OPENWEATHER_API_KEY" } }, { module: "weatherforecast", position: "top_right", header: "Weather Forecast", config: { location: "New York", locationID: "5128581", //ID from http://bulk.openweathermap.org/sample/city.list.json.gz; unzip the gz file and find your city appid: "YOUR_OPENWEATHER_API_KEY" } }, { module: "newsfeed", position: "bottom_bar", config: { feeds: [ { title: "New York Times", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" } ], showSourceTitle: true, showPublishDate: true, broadcastNewsFeeds: true, broadcastNewsUpdates: true } },{ module: "MMM-AssistantMk2", position: "top_left", config: { debug: false, ui: "Classic", // Classic2, Classic or Simple // if you want Google Nest ui style // set Fullscreen ui AND fullscreen_above position assistantConfig: { projectId: "", // Required to use gaction. modelId: "", // (OPTIONAL for gaction) instanceId: "", // (OPTIONAL for gaction) latitude: 52.0955919, longitude: 4.4711253, }, responseConfig: { useHTML5: true, // sound render by HTML5 useScreenOutput: true, useAudioOutput: true, useChime: true, timer: 5000, myMagicWord: true, //Your prefer sound play program. //By example, if you are running this on OSX, `afplay` could be available. //by default mpg321 play program is enabled //if audio output cutting try with mpg123 or cvlc program playProgram: "mpg321", chime: { beep: "beep.mp3", error: "error.mp3", continue: "continue.mp3", open: "Google_beep_open.mp3", close: "Google_beep_close.mp3", }, // false - animated icons, 'standby' - static icons only for standby state, true - all static icons useStaticIcons: false }, micConfig: { // put there configuration generated by auto-installer recorder: "arecord", device: "plughw:1", }, customActionConfig: { autoMakeAction: false, autoUpdateAction: false, // in RPI, gaction CLI might have some trouble.(current version should be 2.2.4, but for linux-arm, Google haven't updated) so leave this as false in RPI. I don't know it is solved or not. actionLocale: "en-US", // At this moment, multi-languages are not supported, sorry. Someday I'll work. }, recipes: [ "with-MMM-TelegramBot.js" ], profiles: { "default": { profileFile: "default.json", lang: "en-US" } }, useA2D: false, A2DStopCommand: "stop", useSnowboy: true, snowboy: { audioGain: 2.0, Frontend: true, Model: "jarvis", Sensitivity: null }, }, }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;}
(it’s running on raspberry pi 4b)
-
useSnowboy: true,
if you use this feature, you need to update AMk2
npm run update
try 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 --version
in 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 preferedstop
command
by default it’sstop
but … it’s depend of your language !
for exemple in french language, when i saystop
, google transcriptstoppe
you have an exemple in AMk2 structure sample