Git Product home page Git Product logo

mmm-webspeechtts's Introduction

MMM-WebSpeechTTS

An experimental Text-To-Speech module for MagicMirror² which uses the Web Speech API of the browser.

Project status

This module is still under construction and only works partially!

The architecture of the module is still not good, but the approach of using the Web Speech API makes sense and is worth pursuing further.

I am currently investing my time in other projects, but I am happy to receive PRs or talk about issues.

So far, only German is supported, but other languages are to follow. Support would be very welcome!

Features

  • Greeting with time at the start of the MagicMirror².
  • Read aloud by pressing key:
    • Time
    • Departures from MMM-PublicTransportHafas

Installation

  1. Clone this module into your MagicMirror² modules folder.
cd ~/MagicMirror/modules
git clone https://github.com/KristjanESPERANTO/MMM-WebSpeechTTS/
  1. Install dependencies:
sudo apt-get install espeak-ng speech-dispatcher

Configuration

Add the configuration of the module to your config.js:

{
  module: "MMM-WebSpeechTTS",
  position: "top_left",
  config: {
    greetingsAtStartup: true,
    modules: ["MMM-PublicTransportHafas"]
  }
},

Config options

Option Default Description
greetingsAtStartup true If true, the MagicMirror² will greet you after it has started.
hidden true Set the value to false if you want to see the text that is read out on your mirror.
modules [] Array of modules which you wanna use. Till now only "MMM-PublicTransportHafas" is possible.
text "MMM-WebSpeechTTS" Text to display at startup if hidden:false.

Keyboard control

Key Modul Description
g built-in Greeting.
s built-in Stop the reading.
t built-in Tell the time.
d "MMM-WebSpeechTTS" Read the departures.

Run it

You have to modify the way you are starting MagicMirror². You have three options:

A. Adapt package.json of MagicMirror²

Add script to package.json: "start:tts": "speech-dispatcher -s -t 0 & npm run start -- --enable-speech-dispatcher",,

Start with: npm run start:tts

B. Run command

Run speech-dispatcher -s -t 0 & npm run start -- --enable-speech-dispatcher instead of npm run start.

C. Server mode

Start with: npm run server and open MagicMirror² in Firefox.

ToDo: Test with other browsers.

Update

Go to the module’s directory and pull the latest version from GitHub:

cd ~/MagicMirror/modules/MMM-WebSpeechTTS
git pull

ToDo

  • Use MMM-Keypress instead of self handling keys
  • Mention in MMM-Public-TransportHafas that TTS is possible with this module
  • Translations
  • Read messages from notifications like other modules.

mmm-webspeechtts's People

Contributors

kristjanesperanto avatar dependabot[bot] avatar

Stargazers

Justus W. avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.