Initial text-to-speech (TTS) docs (#1588)

* Add tts to demo

* Add initial TTS docs

* Update

* Speak->speech

* Speak->speech

* Speak->speech

* Update tts.markdown

* Update tts.google.markdown

* Update tts.markdown

* Update tts.google.markdown

* Add files via upload

* Create tts.voicerss.markdown

* Update tts.voicerss.markdown

* Update tts.voicerss.markdown

* Update
This commit is contained in:
Fabian Affolter 2016-12-17 19:33:45 +01:00 committed by GitHub
parent c63bfa5132
commit 220ff1b86a
6 changed files with 155 additions and 0 deletions

View File

@ -28,6 +28,7 @@ Available demo platforms:
- [Remote](/components/remote/) (`remote`) - [Remote](/components/remote/) (`remote`)
- [Sensor](/components/sensor/) (`sensor`) - [Sensor](/components/sensor/) (`sensor`)
- [Switch](/components/switch/) (`switch`) - [Switch](/components/switch/) (`switch`)
- [Text-to-speech](/components/tts/) (`tts`)
- [Weather](/components/weather/) (`weather`) - [Weather](/components/weather/) (`weather`)
To integrate a demo platform in Home Assistant, add the following section to your `configuration.yaml` file: To integrate a demo platform in Home Assistant, add the following section to your `configuration.yaml` file:

View File

@ -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'
```

View File

@ -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
```

View File

@ -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
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 81 KiB