diff --git a/source/_components/demo.markdown b/source/_components/demo.markdown index 40f247b187a..1fd904862af 100644 --- a/source/_components/demo.markdown +++ b/source/_components/demo.markdown @@ -28,6 +28,7 @@ Available demo platforms: - [Remote](/components/remote/) (`remote`) - [Sensor](/components/sensor/) (`sensor`) - [Switch](/components/switch/) (`switch`) +- [Text-to-speech](/components/tts/) (`tts`) - [Weather](/components/weather/) (`weather`) To integrate a demo platform in Home Assistant, add the following section to your `configuration.yaml` file: diff --git a/source/_components/tts.google.markdown b/source/_components/tts.google.markdown new file mode 100644 index 00000000000..2a650a1bda8 --- /dev/null +++ b/source/_components/tts.google.markdown @@ -0,0 +1,36 @@ +--- +layout: page +title: "Google Text-to-Speech" +description: "Instructions how to setup Google Text-to-Speech with Home Assistant." +date: 2016-12-13 07:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: google.png +ha_category: Text-to-speech +ha_release: 0.35 +--- + +The `google` text-to-speech platform uses [Google Text-to-Speech engine](https://console.developers.google.com/apis/api/speech.googleapis.com/overview) Text-to-Speech engine to read a text with natural sounding voices. + +To enable text-to-speech with Google, add the following lines to your `configuration.yaml`: + +```yaml +# Example configuration.yaml entry +tts: + - platform: google +``` + +Configuration variables: + +- **language** (*Optional*): The language to use. Defaults to `en`. + +A full configuration sample: + +```yaml +# Example configuration.yaml entry +tts: + - platform: google + language: 'de' +``` diff --git a/source/_components/tts.markdown b/source/_components/tts.markdown new file mode 100644 index 00000000000..1c28b44ff9d --- /dev/null +++ b/source/_components/tts.markdown @@ -0,0 +1,73 @@ +--- +layout: page +title: "Text-to-Speech (TTS)" +description: "Instructions how to setup Text-to-Speech (TTS) with Home Assistant." +date: 2016-12-13 07:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_release: 0.35 +--- + +Text-to-speech (TTS) enables Home Assistant to speak to you. + +## {% linkable_title Cache %} + +The component have two caches. Both caches can be controlled with the `cache` option in the platform configuration or the service call `say`. A long time cache will be located on the file system. The in-memory cache for fast responses to media players will be auto-cleaned after a short period. + +## {% linkable_title Configuring a `tts` platform %} + +To get started, add the following lines to your `configuration.yaml` (example for google): + +```yaml +# Example configuration.yaml entry for google tts service +tts: + - platform: google +``` + +The following optional parameters can be used with any platform. However the TTS component will only look for global settings under the configuration of the first configured platform: + +| Parameter | Default | Description | +|---------------------|---------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| `cache` | True | Allow TTS to cache voice file to local storage. | +| `cache_dir` | tts | Foldername or path to folder for caching files. | +| `time_memory` | 300 | Time to hold the voice data inside memory for fast play on media player. Minimum is 60 s and the maximum 57600 s (16 hours). | + +The extended example from above would look like the following sample: + +```yaml +# Example configuration.yaml entry for google tts service +tts: + - platform: google + cache: true + cache_dir: /tmp/tts + time_memory: 300 +``` + +## {% linkable_title Service say %} + +Say to all `media_player` device entities: + +```yaml +service: tts.platform_say +data: + message: 'May the Force be with you.' +``` + +```yaml +service: tts.platform_say +entity_id: media_player.floor +data: + message: 'May the Force be with you.' +``` + +With a template: + +```yaml +service: tts.platform_say +data_template: + message: 'Temperature is {% raw %}{{ sensor.temperature }}{% endraw %}.' + cache: false +``` + diff --git a/source/_components/tts.voicerss.markdown b/source/_components/tts.voicerss.markdown new file mode 100644 index 00000000000..b89fa5ec71d --- /dev/null +++ b/source/_components/tts.voicerss.markdown @@ -0,0 +1,45 @@ +--- +layout: page +title: "VoiceRSS" +description: "Instructions how to setup VoiceRSS TTS with Home Assistant." +date: 2016-12-13 07:00 +sidebar: true +comments: false +sharing: true +footer: true +logo: voicerss.png +ha_category: Text-to-speech +ha_release: 0.35 +--- + +The `voicerss` text-to-speech platform uses [VoiceRSS](http://www.voicerss.org/) Text-to-Speech engine to read a text with natural sounding voices. + +To enable text-to-speech with VoiceRSS, add the following lines to your `configuration.yaml`: + +```yaml +# Example configuration.yaml entry +tts: + - platform: voicerss + api_key: 'XXXXXXXX' +``` + +Configuration variables: + +- **api_key** (*Requered*): API Key for use this service. +- **language** (*Optional*): The language to use. Defaults to `en-us`. +- **codec** (*Optional*): Audo codec. Default is 'mp3'. +- **format** (*Optional*): Audio sample format. Default is '8khz_8bit_mono' + +See on api [documentation](http://www.voicerss.org/api/documentation.aspx) for allow values. + +A full configuration sample: + +```yaml +# Example configuration.yaml entry +tts: + - platform: voicerss + api_key: 'XXXXX' + language: 'de-de' + codec: mp3 + format: 8khz_8bit_mono +``` diff --git a/source/images/supported_brands/google.png b/source/images/supported_brands/google.png new file mode 100644 index 00000000000..743a8e21c26 Binary files /dev/null and b/source/images/supported_brands/google.png differ diff --git a/source/images/supported_brands/voicerss.png b/source/images/supported_brands/voicerss.png new file mode 100644 index 00000000000..09908ee79dd Binary files /dev/null and b/source/images/supported_brands/voicerss.png differ