Skip to content

fewieden/MMM-voice

Repository files navigation

MMM-voice GitHub license Build Status Code Climate Known Vulnerabilities API Doc

Voice Recognition Module for MagicMirror2

Information

This voice recognition works offline. To protect your privacy, no one will record what's going on in your room all day long. So keep in mind that there is no huge server farm, that handles your voice commands. The raspberry is just a small device and this is a cpu intensive task. Also the dictionairy has only the words specified by the modules, so there is a chance for false positives.

If you can live with latency, bugged detections and want to have data privacy, feel free to use this module.

Dependencies

Installation

  1. Clone this repo into ~/MagicMirror/modules directory.

  2. Run command bash dependencies.sh in ~/MagicMirror/modules/MMM-voice/installers directory, to install all dependencies. This will need a couple of minutes.

  3. Configure your ~/MagicMirror/config/config.js:

    {
        module: 'MMM-voice',
        position: 'bottom_bar',
        config: {
            microphone: 1,
            ...
        }
    }
    

Config Options

Option Default Description
microphone REQUIRED Id of microphone shown in the installer.
keyword 'MAGIC MIRROR' Keyword the mirror starts to listen. IMPORTANT: Only UPPERCASE Letters
timeout 15 time the keyword should be active without saying something

Usage

You need to say your KEYWORD (Default: MAGIC MIRROR), when the KEYWORD is recognized the microphone will start to flash and as long as the microphone is flashing (timeout config option) the mirror will recognize COMMANDS or MODES (Keep in mind that the recognition will take a while, so when you say your COMMAND right before the microphone stops flashing the COMMAND will propably not recognized).

Mode of this module: VOICE

COMMANDS:

  • HIDE MODULES
  • SHOW MODULES
  • WAKE UP
  • GO TO SLEEP
  • OPEN HELP
  • CLOSE HELP

Select Mode

To select a MODE, the specfic MODE has to be the first word of a COMMAND or right after the KEYWORD, when the microphone stopped flashing.

Supported modules

List of all supported modules in the Wiki.

Developer

  • npm run lint - Lints JS and CSS files.
  • npm run docs - Generates documentation.

Documentation

The documentation can be found here

Developers Guide

If you want to support your own module, check out the Guide and add it to the Wiki.