multi-keyword listener for MMM-GoogleAssistant
Used Technology:
It will include:
I have created automatic installer for RaspberryPi and Linux Debian machines.
Auto install script will propose to install needed dependencies.
For OSX machines, auto install script is not yet implented.
So, manuel installation is nedeed and no help will be given for this
cd ~/MagicMirror/modules/MMM-GoogleAssistant
npm run install:EXT-Detector
npm
commands (e.g. npm audit fix) are needed after installation (they can break package dependencies)!use config.js file of MagicMirror for configuring EXT-Detector
This default configuration will enable automaticaly
snowboy
andporcupine
features for listening this keyword:**
jarvis
for activate MMM-GoogleAssistant (with snowboy feature)
**ok google
for activate MMM-GoogleAssistant (with porcupine feature)
**hey google
for activate MMM-GoogleAssistant (with porcupine feature)
{
module: "MMM-GoogleAssistant/EXTs/EXT-Detector",
position: "top_left",
configDeepMerge: true
},
This complete config is reserved for tunning.
The result is the same like default configuration
See Configuration Structure for more informations
{
module: "MMM-GoogleAssistant/EXTs/EXT-Detector",
position: "top_left",
config: {
debug: false,
useIcon: true,
porcupineAccessKey: null,
porcupineCustomModel: null,
detectors: [
{
detector: "Snowboy",
Model: "jarvis",
Sensitivity: null
},
{
detector: "Porcupine",
Model: "ok google",
Sensitivity: null
},
{
detector: "Porcupine",
Model: "hey google",
Sensitivity: null
}
]
}
}
If you want only Jarvis for activating GoogleAssistant
Just delete all detector in Array but notJarvis
And Naturally, this is sample of result with Javis
keyword only for activate GoogleAssistant
{
module: "MMM-GoogleAssistant/EXTs/EXT-Detector",
position: "top_left",
config: {
debug: false,
detectors: [
{
detector: "Snowboy",
Model: "jarvis",
Sensitivity: null
}
]
}
}
For using porcupine hotwords you need an AccessKey from picovoice.ai website
Now you have understand how
detectors: []
works, you can create your own
Explanation of all the features
Display needed value for debug mode
config: {
debug: false,
}
field type default value debug BOOLEAN false
When you set debug
to true
, detailed log will be recorded. When you don't want log, set it to false
Display Google Icon on screen
Tip: You can set this feature to
false
when you useEXT-Touch
plugin
config: {
useIcon: true,
}
field type default value useIcon BOOLEAN true
useIcon
: Activate display of logo and animate it when keyword discover
You don't have to copy this sample in your config (already in EXT-Detector main core)
You have just to copy this feature only if you want to desactivate it (withfalse
value)
If you want to use Porcupine features,
You need to register an Free account on picovoice.ai
When done, on your account, you will discover yourAccessKey
field type default value porcupineAccessKey String null
porcupineAccessKey
: past your AccessKey from picoVoice.ai account
config: {
porcupineAccessKey: "myencodedAccessKeyFromPicovoice.ai",
}
Just past your AccessKey like sample
You can create your own hotword for Porcupine from your picovoice.ai account
You have to useModel: "Custom"
in the Detectors array (see sample below)
field type default value porcupineCustomModel String null
porcupineCustomModel
: name of the file of your custom model
Unzip and copy (and renane if you want) the
.ppn
(custom model file) file into thecustom
folder ofEXT-Detector
Warn: when you create your own custom model, choose
en
language for create it
Other natural language will be coded soon
config: {
porcupineCustomModel: "ispecedicounasse.ppn",
}
In this sample, i have create an custom model named: ispecedicounasse.ppn
Keywords listener configuration
config: {
detectors: [
{
detector: "Snowboy",
Model: "jarvis",
Sensitivity: null
},
{
detector: "Porcupine",
Model: "ok google",
Sensitivity: null
},
{
detector: "Porcupine",
Model: "hey google",
Sensitivity: null
}
],
}
field type detectors Array -detector STRING -Model STRING -Sensitivity NUMBER
detectors is an array of listener, you can add any detector and any keyword as you want !
detector
: the detector Program Name to use Snowboy
or Porcupine
Model
: name of the model (see below)
Sensitivity
: Override default sensitivity value for applied model defined in Model. (see below)
Value could be within a range from 0.0 to 1.0. null
will set default sensitivity.
detector Model Sensitivity Snowboy smart_mirror 0.5 Snowboy jarvis 0.7 Snowboy computer 0.6 Snowboy snowboy 0.5 Snowboy subex 0.6 Snowboy neo_ya 0.7 Snowboy hey_extreme 0.6 Snowboy view_glass 0.7 Porcupine americano 0.7 Porcupine blueberry 0.7 Porcupine bumblebee 0.7 Porcupine computer 0.7 Porcupine grapefruit 0.7 Porcupine grasshopper 0.7 Porcupine hey google 0.7 Porcupine hey siri 0.7 Porcupine jarvis 0.7 Porcupine ok google 0.7 Porcupine picovoice 0.7 Porcupine porcupine 0.7 Porcupine terminator 0.7 Porcupine Custom 0.7
{
module: "MMM-GoogleAssistant/EXTs/EXT-Detector",
position: "top_left",
config: {
porcupineAccessKey: "myencodedAccessKeyFromPicovoice.ai",
porcupineCustomModel: "ispecedicounasse.ppn",
detectors: [
{
detector: "Porcupine",
Model: "custom",
Sensitivity: null
}
]
}
}
In this case, I have create an custom model for Porcupine
ispecedicounasse.ppn
For use it, use theModel: "custom"
in the Detector array
If a new version of EXT-Detector is available
cd ~/MagicMirror/modules/MMM-GoogleAssistant
npm run update
This command can help also if any problem on EXT-Detector (it's equal to make a complete reinstall of this module)
cd ~/MagicMirror/modules/MMM-GoogleAssistant
npm run rebuild:EXT-Detector
cd ~/MagicMirror/modules/MMM-GoogleAssistant
npm run remove:EXT-Detector