Read the statement by Michael Teeuw here.
MMM-Hotword,MMM-AssistanMk2 Hotword no Funktion
-
Sorry posted Wrong config.js
This is for MMM -Assistant/* Magic Mirror Config Sample * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. * * For more information how you can configurate this file * See https://github.com/MichMich/MagicMirror#configuration * */ 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, 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"], language: "de", timeFormat: 24, units: "metric", modules: [ { module: "alert", }, { module: "updatenotification", position: "top_bar" }, { 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-Hotword", position: "top_right", config: { // chimeOnFinish: null, detectorAudioGain: 2.0, detectorApplyFrontend: false, // When you are using `.pmdl`, set this to `false`. // For `.umdl`, When you use only`snowboy` and `smart_mirror`, `false` is better. But with other models, `true` is better. mic: { recordProgram : "arecord", //record prgram, `rec`, `arecord`, `sox`, `parec` is available device : "plughw:1", sampleRate : 16000, // audio sample rate channels : 1, // number of channels threshold : 0.5, thresholdStart: null, thresholdEnd : null, silence : 1.0, // detect end of your hotword or afterRecord. verbose : false, // log info to the console }, recipes: [], models: [], commands: {}, defaultCommand: { notificationExec: { notification: "HOTWORD_DETECTED", payload: (detected, afterRecord) => { return {hotword:detected, file:afterRecord} } } }, chimeOnFinish: "resources/ding.wav", // If you don't want to use chime, set this to null. useDisplay: true, iconify: "https://code.iconify.design/1/1.0.2/iconify.min.js", //iconify: null, //When you use this module with `MMM-CalendarExt2`, `MMM-Spotify` or any other `iconify` used modules together, Set this to null. icons: { //https://iconify.design/icon-sets/ waiting: "uil-comment-message", detected: "uil-comment-exclamation", finished: "uil-comment-dots", }, // customizable notification trigger notifications: { PAUSE: "HOTWORD_PAUSE", RESUME: "HOTWORD_RESUME", LISTENING : "HOTWORD_LISTENING", SLEEPING : "HOTWORD_SLEEPING", ERROR : "HOTWORD_ERROR", DETECTED: "HOTWORD_DETECTED" }, //mic: { // recordProgram: "arecord", // device: "default" //}, models: [ { hotwords : "smart_mirror", file : "smart_mirror.umdl", sensitivity : "0.5", }, ], commands: { "smart_mirror": { notificationExec: { notification: "ASSISTANT_ACTIVATE", payload: (detected, afterRecord) => { return {profile:"default"} } }, models: [ { hotwords : "Magic_Mirror", file : "Magic_Mirror.pmdl", sensitivity : "0.5", }, ], commands: { "volume_up" : { notificationExec: { notification: "VOLUME_UP" } } }, restart:false, afterRecordLimit:0 } } } }, { module: "MMM-AssistantMk2", position: "top_right", config: { deviceLocation: { coordinates: { latitude: 37.5650168, // -90.0 - +90.0 longitude: 126.8491231, // -180.0 - +180.0 }, }, record: { recordProgram : "arecord", device : "plughw:1", }, notifications: { ASSISTANT_ACTIVATED: "HOTWORD_PAUSE", ASSISTANT_DEACTIVATED: "HOTWORD_RESUME", }, useWelcomeMessage: "brief today", profiles: { "default" : { lang: "de-DE" } }, } }, ] }; /*************** DO NOT EDIT THE LINE BELOW ***************/ if (typeof module !== "undefined") {module.exports = config;}
-
@MichaelKrems
You don’t need to use all of the fields of configuration sample.Just try from here;
https://github.com/eouia/MMM-AssistantMk2/wiki/Configuration#with-mmm-hotwordv2 (
with MMM-Hotword(v2)
section) -
@Sean You can help me with the command exec section, calling the browser with the parameter as well as the command line in mmm-hotword
-
@guongthongminh Sorry, I can’t catch your intention. What exactly do you want to do?
-
@Sean Can you help me with the website part shown on the mirror?
-
@Sean using MMM-NotificationTrigger to invoke the voice search browser
-
@guongthongminh
Do you mean, you want to show specific web page when you say hotword?
In that case, which module are you using to show web page? -
@Sean Can I use the default browser, Chromium?
MMM-PageReader is also possible.
Sorry for not good at english! -
@guongthongminh
First, using default Browser(Chromium) is not so good idea. You could lose control.
I’m reading MMM-PageReader(https://github.com/dgburr/MMM-PageReader) now, it seems possible to use.models: [ { hotwords : "smart_mirror", file : "smart_mirror.umdl", sensitivity : "0.5", }, // You can add more models here. ], commands: { "smart_mirror": { notificationExec: { notification: "PAGE_READER_LOAD", payload: "https://forum.magicmirror.builders/topic...." } }, // You can add more commands here }
In this example, you can activate MMM-PageReader with hotword “smart mirror”. Not tested, but ideally working like this.
-
@Sean Thank you very much!
Let me try and see how I hope it will look perfect