This is a module for the MagicMirror².
Add Google Cloud Speech recognition to Magic Mirror.
This module requires you to install SoX.
sudo apt-get install sox libsox-fmt-all
brew install sox
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.
- Visit the Google Cloud Speech - Before you begin section
- Complete the Project Setup
- Download the private key as JSON, and place it in the root of this module with the name
auth.json
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'
]
}
}
]
}
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. |