Giter Club home page Giter Club logo

mmm-snowboy's Introduction

MMM-Snowboy

License

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)

Installation and updates

To install and update MMM-Snowboy module, you can use automatic scripts.

Automatic installation

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

Manual installation

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

Automatic update

If you have installed module already, run the following code to update your install:

cd ~/MagicMirror/modules/MMM-Snowboy
npm run update

Full Snowboy rebuild

  • 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

Update

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

2020/04/11: v1.0.1

  • FIX: Installer
  • ADD: Alexa

2020/04/09: v1.0.0

  • Initial Release

Configuration

Minimal configuration

{
  module: 'MMM-Snowboy',
  config: {
    Frontend: false,
    Model: "smart_mirror"
  }
},

Personalized configuration

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
       }
    }
  }
},

Options

  • 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 in Model.

    • Value could be within a range from 0.0 to 1.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
    • 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.
  • 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.

Notification received

MMM-Snowboy can receive notification for start or stop listening

  • SNOWBOY_START: Start listening with your prefered hotkey
  • SNOWBOY_STOP: Stop Litening

Notes

  • this module don't need position, because it don't use any visual
  • With npm install, you can generate a proper micConfig {} configuration.

Snowboy

This module use my personal @bugsounet/snowboy library build for node and will be maintened
Original snowboy@kitt-AI source will be unmaintened soon

mmm-snowboy's People

Contributors

sergge1 avatar bugsounet avatar

Forkers

overcyber dabtys

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.