MMM-GoogleAssistant is a customizable hotword detection module to activate/notify other MagicMirror modules. This is a pre-trained model that can activate an embedded Google Assistant that requires OAuth Keys. The Porcupine Wake Word Engine is open-source and executes ONLY locally.
ENABLE THE FOLLOWING APIS on your Google Cloud Project in the Google Cloud Console:
- Cloud Pub/Sub API
- Google Assistant API
- Cloud Speech-to-Text API
-
Register a model & download the client_secret.json
-
Run Jarvis.js to test your configuration and say "Jarvis"
-
The system will open a local browser and require you to login with your Google Account.
If you would like to setup facial recognition on another device, highly recommended setup instructions here: https://github.com/jeffmur/Smart-Mirror
Now your tokens.json will be automatically generated and access to the Embedded Google Assistant API.
My wakeword is set to "jarvis", others include :
The default hotwords are:
ALEXA: ALEXA,
AMERICANO: AMERICANO,
BLUEBERRY: BLUEBERRY,
BUMBLEBEE: BUMBLEBEE,
COMPUTER: COMPUTER,
GRAPEFRUIT: GRAPEFRUIT,
GRASSHOPPER: GRASSHOPPER,
HEY_GOOGLE: HEY_GOOGLE,
HEY_SIRI: HEY_SIRI,
JARVIS: JARVIS,
OK_GOOGLE: OK_GOOGLE,
PICOVOICE: PICOVOICE,
PORCUPINE: PORCUPINE,
TERMINATOR: TERMINATOR,
See Picovoice Porcupine for info on how to train your own model
cd ~/MagicMirror/modules
git clone https://github.com/jeffmur/MMM-GoogleAssistant
cd MMM-GoogleAssistant
npm install
A sample configuration is available on Smart Mirror as sample.config.json. There are two other modules that connect to this service: MMM-ProfileSwitcher and MMM-DeviceControl which controls Volume + Screensaver on Raspberry Pi Buster. See the main repo: https://github.com/jeffmur/Smart-Mirror
Supports multiple hotwords & sensitivities
{
module: 'MMM-GoogleAssistant',
config: {
debug: false,
hotword: ["jarvis"],
sensitivity: [0.7]
}
classes: "everyone" // authorized users get access to Google Assistant
}
-
debug
- turn on/off debug mode. -
hotword
- The hotword you wish to detect. -
sensitivity
- Override default sensitivity value- Value could be within a range from
0.0
to1.0
. - Default sensitivity values is 0.7
- Value could be within a range from
MMM-GoogleAssistant can receive notification for start or stop listening based on user login events from MMM-ProfileSwitcher
ASSISTANT_START
: Start listening for hotwordsASSISTANT_STOP
: Stop listening for hotwords