EXT‐Detector - bugsounet/MMM-Bugsounet GitHub Wiki

Multi-keyword listener for EXT-Assistant

  • Used Technology:

    • Snowboy Features
    • Porcupine Features
  • It will include:

    • Ok Google
    • Hey Google
    • Jarvis
    • Hey Siri
    • Computer
    • ...

Installation

Execute npm npm run setup:EXT-Detector in the MMM-Bugsounet's folder.

cd ~/MagicMirror/modules/MMM-Bugsounet
npm run setup:EXT-Detector

Configuration

use config.js file of MagicMirror for configuring EXT-Detector

Default configuration sample with Snowboy detector

See Configuration Structure for more informations

{
  module: "MMM-Bugsounet/EXTs/EXT-Detector",
  position: "top_left",
  config: {
    debug: false,
    useIcon: true,
    detectors: [
      {
        detector: "Snowboy",
        Model: "jarvis",
        Sensitivity: null
      }
    ]
  }
}

Default configuration sample with Porcupine detector

For using Porcupine hotwords you need an AccessKey from picovoice.ai website

See Configuration Structure for more informations

{
  module: "MMM-Bugsounet/EXTs/EXT-Detector",
  position: "top_left",
  config: {
    debug: false,
    useIcon: true,
    porcupineAccessKey: null,
    porcupineCustomModel: null,
    detectors: [
      {
        detector: "Porcupine",
        Model: "ok google",
        Sensitivity: null
      },
      {
        detector: "Porcupine",
        Model: "hey google",
        Sensitivity: null
      }
    ]
  }
}

Default configuration sample with Snowboy detector and Porcupine detector

You can merge all detectors in detectors Array

See Configuration Structure for more informations

{
  module: "MMM-Bugsounet/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
      }
    ]
  }
}

Configuration Structure

Explanation of all the features

debug

Display needed value for debug mode

Sample

  config: {
    debug: false,
  }

Details

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

useIcon

Display Google Icon on screen

Tip: You can set this feature to false when you use EXT-Touch plugin

Sample

  config: {
    useIcon: true,
  }

Details

field type default value
useIcon BOOLEAN true

useIcon: Activate display of logo and animate it when keyword discover

porcupineAccessKey (optional)

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 your AccessKey

Details

field type default value
porcupineAccessKey String null

porcupineAccessKey: past your AccessKey from picoVoice.ai account

sample

  config: {
    porcupineAccessKey: "myencodedAccessKeyFromPicovoice.ai",
  }

Just past your AccessKey like sample :)

porcupineCustomModel

You can create your own hotword for Porcupine from your picovoice.ai account

You have to use Model: "Custom" in the Detectors array (see sample below)

Details

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 the custom folder of EXT-Detector

Warn: when you create your own custom model, choose en language for create it

Other natural language will be coded soon

sample

  config: {
   porcupineCustomModel: "ispecedicounasse.ppn",
  }

In this sample, i have create an custom model named: ispecedicounasse.ppn

detectors: []

Keywords listener configuration

Sample

  config: {
    detectors: [
      {
        detector: "Snowboy",
        Model: "jarvis",
        Sensitivity: null
      },
      {
        detector: "Porcupine",
        Model: "ok google",
        Sensitivity: null
      },
      {
        detector: "Porcupine",
        Model: "hey google",
        Sensitivity: null
      }
    ],
  }

Details

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.

Model and default Sensitivity by detector program

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

Complete Sample with CustomModel with Porcupine

{
  module: "MMM-Bugsounet/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 the Model: "custom" in the Detector array