Text-To-Speech module for the MagicMirror².
- It uses external MMM-Sounds module to play sound, so you must install it first.
- Navigate into your MagicMirror's
modules
folder and executegit clone https://github.com/jc21/MMM-Sounds.git
- Navigate into your MagicMirror's
- If you don't have LAME package on your system, follow the instructions to install it.
- Needs the node module es6-promise
- npm install es6-promise
- Navigate into your MagicMirror's
modules
folder and executegit clone https://github.com/ChrisB85/MMM-Text-To-Speech.git
- Go to MMM-Text-To-Speech directory and run
npm install
- Add the following configuration block to the modules array in the
config/config.js
file:
var config = {
modules: [
{
module: 'MMM-Text-To-Speech',
config: {
// See below for configurable options
...
mqttServer: {
...
}
}
}
]
}
- Send notification with text as payload:
this.sendNotification("MMM-Text-To-Speech", "Hello " + payload);
or
this.sendNotification("MMM-TTS", "Hello " + payload);
Option | Description |
---|---|
language |
Optional Speech language. Defaults to en . |
speed |
Optional Speech speed. |
soundModuleDir |
Optional Name of sound module folder. Defaults to MMM-Sounds . |
mqttServer |
Optional MQTT server section: |
address Host name or IP address |
|
port Port, defaults to 1883 |
|
topic Topic to subscribe to |
|
user Optional User name |
|
password Optional Password |