mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-05-28 05:46:48 +00:00

* 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
2.8 KiB
2.8 KiB
layout, title, description, date, sidebar, comments, sharing, footer, ha_release
layout | title | description | date | sidebar | comments | sharing | footer | ha_release |
---|---|---|---|---|---|---|---|---|
page | Text-to-Speech (TTS) | Instructions how to setup Text-to-Speech (TTS) with Home Assistant. | 2016-12-13 07:00 | true | false | true | true | 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):
# 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:
# 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:
service: tts.platform_say
data:
message: 'May the Force be with you.'
service: tts.platform_say
entity_id: media_player.floor
data:
message: 'May the Force be with you.'
With a template:
service: tts.platform_say
data_template:
message: 'Temperature is {% raw %}{{ sensor.temperature }}{% endraw %}.'
cache: false