MMM-Snowboy is a customizable hotword detection module to activate any assistant of your MagicMirror
This module can listen any hotword like "Smart mirror" , "Jarvis" or "Alexa" (standard hotwords from Snowboys database)
To install and update MMM-Snowboy module, you can use automatic scripts.
For automatic installation run this command and execute electron rebuild step:
cd ~/MagicMirror/modules/
git clone https://github.com/bugsounet/MMM-Snowboy
cd MMM-Snowboy
npm install
MMM-Snowboy need some libraries
libmagic-dev libatlas-base-dev sox libsox-fmt-all build-essential
sudo apt-get install libmagic-dev libatlas-base-dev sox libsox-fmt-all build-essential
cd ~/MagicMirror/modules/
git clone https://github.com/bugsounet/MMM-Snowboy
cd MMM-Snowboy
npm install
Don't execute automatic installation
Do you want to execute automatic intallation ? [Y/n]
Your choice: N
Don't execute electron rebuild
Do you want to execute electron rebuild ? [Y/n]
Your choice: N
Now, do electron rebuild step manualy:
./node_modules/.bin/electron-rebuild
If you have installed module already, run the following code to update your install:
cd ~/MagicMirror/modules/MMM-Snowboy
npm run update
- If you have some trouble with new a version of MagicMirror
- If you want install lasted version of
@bugsounet/snowboy
library
cd ~/MagicMirror/modules/MMM-Snowboy
npm run rebuild
2020/05/27: v1.2.0
- Fix: Sample default notification
2020/04/22: v1.1.1
- Fix: Cleaning old library (not needed)
2020/04/21: v1.1.0
- ADD: use npm @bugsounet/snowboy library
- FIX: new Code for this library
2020/04/11: v1.0.1
- FIX: Installer
- ADD: Alexa
2020/04/09: v1.0.0
- Initial Release
{
module: 'MMM-Snowboy',
config: {
Frontend: false,
Model: "smart_mirror"
}
},
this is the default configuration defined if you don't define any value
{
module: 'MMM-Snowboy',
config: {
debug: false,
AudioGain: 2.0,
Frontend: true,
Model: "jarvis",
Sensitivity: null,
micConfig: {
recorder: "arecord",
device: "plughw:1"
},
onDetected: {
notification: "SHOW_ALERT",
parameters: {
type: "notification",
message: "Detected !",
title: "MMM-Snowboy",
timer: 10 * 1000
}
}
}
},
-
debug
- turn on/off debug mode. -
AudioGain
- set the gain of mic. Usually you don't need to set or adjust this value. -
Frontend
- set pre-processing of hotword detection. When you use only snowboy and smart_mirror, false is better. But with other models, true is better to recognize. -
Model
- set the name of your detector. Available: "smart_mirror", "jarvis", "computer", "snowboy", "subex", "neo_ya", "hey_extreme", "view_glass" -
Sensitivity
- Override default sensitivity value for applied model defined inModel
.-
Value could be within a range from
0.0
to1.0
. -
Default sensitivity values for preconfigured models are:
- smart_mirror:
0.5
- jarvis:
0.7
- computer:
0.6
- snowboy:
0.5
- subex:
0.6
- neo_ya:
0.7
- hey_extreme:
0.6
- view_glass:
0.7
- alexa:
0.6
- smart_mirror:
-
null
will set default sensitivity.
-
-
recorder
- record program,rec
,arecord
,sox
,parec
is available.- On RaspberryPi or some linux machines,
arecord
is better. - On OSX,
rec
is better. - If you prefer to use
pulse audio
,parec
would be available also.
- On RaspberryPi or some linux machines,
-
device
- recording device (microphone) name of your environment. (e.g. "plughw:1")- Find proper device name by yourself. (arecord -l will be help on Raspberry Pi)
-
notification
- notification name to emit when the hotword is detected. -
parameters
- payload to send with your notification.
MMM-Snowboy can receive notification for start or stop listening
SNOWBOY_START
: Start listening with your prefered hotkeySNOWBOY_STOP
: Stop Litening
- this module don't need position, because it don't use any visual
- With npm install, you can generate a proper micConfig {} configuration.
This module use my personal @bugsounet/snowboy library build for node and will be maintened
Original snowboy@kitt-AI source will be unmaintened soon