Skip to content

MADS-NET/say_plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

say plugin for MADS

This is a Sink plugin for MADS.

This is a sink agent that speaks any string received on in the "tts" field in the JSON input message. The plugin uses the espeak library to generate the speech.

This plugin has been updated for MADS v2

Supported platforms

Currently, the supported platforms are:

  • Linux
  • MacOS

Dependencies

On Linux, the plugin requires the espeak library. To install it, run:

sudo apt-get install espeak libespeak-dev

On MacOS, the plugin requires the espeak library. To install it, run:

brew install espeak

Installation

Linux and MacOS:

cmake -Bbuild -DCMAKE_INSTALL_PREFIX="$(mads -p)"
cmake --build build -j4
sudo cmake --install build

Translation/I18N

The plugin supports translation of the spoken text. The translation is done using a dictionary file that maps the original text to the translated text. The dictionary file is a JSON file with the following format:

{
    "original text": {
        "it": "testo tradotto",
        "fr": "texte traduit",
        "es": "texto traducido"
    }
}

If the translated text is not found in the dictionary, the original text is spoken.

This JSON file must be installed in the fordel share/translate under the MADS installation directory.

INI settings

The plugin supports the following settings in the INI file:

[say]
language = "europe/it" # Must be a valid espeak language code
locale = "it"          # Used for lanuage translation
dictionary = "translations.json" # Name of translation dictionary

All settings are optional; if omitted, the default values are used.

Executable demo

The demo executable joins all its arguments as a single string and speaks them.


About

A Sink plugin adding Text-to-Speech audio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors