manifestinteractive / MMM-Google-Cloud-Speech

Magic Mirror Leap Motion Controller Module for Google Cloud Speech

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MMM-Google-Cloud-Speech

This is a module for the MagicMirror².

Add Google Cloud Speech recognition to Magic Mirror.

NOTE: This is a work in progress and does not currently function

Dependencies

This module requires you to install SoX.

For Linux

sudo apt-get install sox libsox-fmt-all

For Mac OS

brew install sox

For Windows

download the binaries

Installation

After installing the required OS dependencies, you can clone this repo and install it's dependencies:

cd /path/to/MagicMirror/modules
git clone https://github.com/manifestinteractive/MMM-Google-Cloud-Speech
cd MMM-Google-Cloud-Speech
npm install

NOTE: The npm install may appear to be taking longer than normal, and this is expected. There is a postinstall command that rebuilds installed dependencies specifically for electron. Otherwise the voice engine won't work when you include the module in your Magic Mirror app.

Google Cloud Setup

  1. Visit the Google Cloud Speech - Before you begin section
  2. Complete the Project Setup
  3. Download the private key as JSON, and place it in the root of this module with the name auth.json

Using the module

To use this module, add the following configuration block to the modules array in the config/config.js file:

var config = {
  modules: [
    {
      module: 'MMM-Google-Cloud-Speech'
      position: 'top_bar',
      config: {
        debug: true,
        phrases: [
          'go to',
          'next page',
          'previous page'
        ]
      }
    }
  ]
}

Configuration options

Option Type Default Description
device string null Recording Device ( not normally needed, e.g.: 'plughw:1')
languageCode string en-US Language to detect ( see complete languageCode options )
recordProgram string rec Recording Method - Either rec, arecord or sox
debug boolean false Enable Debugging
phrases array [] Provides "hints" to the speech recognizer to favor specific words and phrases in the results.

About

Magic Mirror Leap Motion Controller Module for Google Cloud Speech

License:MIT License


Languages

Language:JavaScript 100.0%