tmikulski / ioBroker.sayitPL

MIT License
0 stars 0 forks source link

Logo ioBroker sayit adapter

NPM version Downloads

NPM

SayIt Adapter can convert text to speech and play it on some device.

Configuration

Actual following outputs are supported:

To enable the text to speech on RaspberryPI or linux system call one time following command sudo apt-get -y install mpg321 to install mpg321.

The mp3/wav files can be played to by writing its name into the object. (e.g. "/vis.0/main/img/door-bell.mp3")

The file must be first loaded.

TTS engines

online:

offline:

Cloud and Amazon Web Services Polly text formatting

You can format your text with (Speech Synthesis Markup Language)[http://docs.aws.amazon.com/polly/latest/dg/ssml.html].

Most useful features:

More info.

System command

If you have some program, that can play audio files locally or somewhere else, you can write this command here. E.g.

myCustomPlayer --option

If System output is selected, the sayit adapter will execute following command on local system:

myCustomPlayer --option /opt/iobroker/node_modules/iobroker.sayit/say.mp3

If file name must stay somewhere in the middle you can use %s to specify where the file name must be placed:

myCustomPlayer --option "%s" > /dev/null

sayIt will make myCustomPlayer --option "/opt/iobroker/node_modules/iobroker.sayit/say.mp3" > /dev/null from it.

Usage

SayIt adapter cannot be used alone. It must be controlled from javascript adapter or from "vis" with specific widget. After creation of adapter instance will can find following objects:

State tts.text supports extended syntax, so the langugage/engine and volume can be defined together with text. It is used to enable multi-language text2speech engines. E.g. if adapter has engine "Google-english", it is possible with phrase de:Sag es to force to use Google-Deustch speech engine.

With ru;75;Погода хорошая we can force to use russian language and volume 75%.

You can specify the volume of announcement in percent from current or given volume (not from maximal). E.g. if command is de;75;Gutes Wetterand "announce volume" is 50%, the announce will be played with volume 38% from 100% possible.

The system command to play the mp3 file can be specified too. If you leave it blank, the default settings will be used: windows - cmdmp3.exe, OSX - /usr/bin/afplay, linux - mpg321 or omxplayer (recommended).

To install omxplayer write sudo apt-get install omxplayer or write sudo apt-get install mpg321 to install mpg321.

Note: The default announce selection will be possible only after start of the instance.

Engines

Following values for engines are possible:

Google

Yandex

Amazon polly via cloud

Pico TTS

Amazon polly direct

Changelog

1.7.0 (2018-06-08)

1.6.8 (2018-04-11)

1.6.7 (2018-02-05)

1.6.6 (2017-11-27)

1.6.5 (2017-11-04)

1.6.4 (2017-10-18)

1.6.3 (2017-10-04)

1.5.2 (2017-03-09)

1.5.1 (2017-02-15)

1.5.0 (2017-01-27)

1.4.0 (2017-01-16)

1.3.3 (2017-01-13)

1.3.2 (2017-01-10)

1.3.1 (2016-12-27)

1.3.0 (2016-12-20)

1.2.1 (2016-10-31)

1.2.0 (2016-10-28)

1.1.3 (2016-10-24)

1.1.2 (2016-10-20)

1.0.1 (2016-10-12)

1.0.0 (2016-05-14)

0.3.16 (2015-12-26)

0.3.16 (2015-12-26)

0.3.15 (2015-11-10)

0.3.14 (2015-11-01)

0.3.13 (2015-10-27)

0.3.12 (2015-10-06)

0.3.11 (2015-08-03)

0.3.10 (2015-07-26)

0.3.9 (2015-07-09)

0.3.8 (2015-06-09)

0.3.7 (2015-05-28)

0.3.6 (2015-03-24)

0.3.5 (2015-03-22)

0.3.4 (2015-03-20)

0.3.3 (2015-03-20)

0.3.2 (2015-03-16)

0.3.1 (2015-03-15)

0.3.0 (2015-03-08)

0.2.2 (2015-03-08)

0.2.1 (2015-03-07)

0.2.0 (2015-03-02)

0.1.0 (2015-03-02)

0.0.1 (2015-02-06)

License

The MIT License (MIT)

Copyright (c) 2014-2017, bluefoxdogafox@gmail.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.