- *Windows engine* - the text will be played by windows, where the sayIt adapter runs. For this will be used windows text to speech engine, that should be preconfigured by user. You can check [here](http://windows.microsoft.com/en-us/windows/setting-speech-options#1TC=windows-7) how to setup it.
- Google: English, German, Russian, Italian, Spanish, French
- Yandex: Russian
To use Yandex voices you must request the API key here: [https://tech.yandex.ru/speechkit/cloud/doc/dg/concepts/About-docpage/](https://tech.yandex.ru/speechkit/cloud/doc/dg/concepts/About-docpage/).
To use Amazon(Ivona) voices you need to get access key and secret key [here](http://www.ivona.com/us/for-business/speech-cloud/).
- Cloud:
To use Cloud voices you need configured cloud adapter. (It can be disabled, but must be configured). This service use AWS Polly and it can be used directly.
- Amazon Web Services Polly:
To use AWS Polly voices you need to create access key and secret key [here](https://console.aws.amazon.com/iam/home). The Amazon documentation can you find [here](http://docs.aws.amazon.com/general/latest/gr/managing-aws-access-keys.html).
offline:
- PicoTTS (linux only): English, German, Italian, Spanish, French
For PicoTTS it is necessary to install the following packages: libttspico-utils and lame.
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/yunkong2/node_modules/yunkong2.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:
- sayit.N.tts.text: Phrase to be spoken.
- sayit.N.tts.volume: volume which will be used by playing of the phrase.
- sayit.N.tts.playing: true if text is now playing and false if not. Supported only for "windows" and "system" play mode.
- sayit.N.tts.cachetext: Phrase to be cached and then it can be used without internet.
E.g. you can enter here manually "No internet" and if ping to google.com is negative, write "No internet" to "tts.text" and it will pronounced. Of course cache must be enabled.
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 Wetter```and "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.