You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/_components/tts.amazon_polly.markdown
+51-6Lines changed: 51 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ha_release: 0.37
15
15
The `amazon_polly` text-to-speech platform that works with [Amazon Polly](https://aws.amazon.com/polly/) to create the spoken output.
16
16
Polly is a paid service via Amazon Web Services. There is a [free tier](https://aws.amazon.com/polly/pricing/) for the first 12 months and then a charge per million characters afterwards.
17
17
18
-
To enable text-to-speech with Amazon Polly, add the following lines to your `configuration.yaml`:
18
+
To get started, add the following lines to your `configuration.yaml` (example for Amazon Polly):
19
19
20
20
```yaml
21
21
# Example configuration.yaml entry
@@ -29,9 +29,54 @@ tts:
29
29
30
30
Configuration variables:
31
31
32
-
- **aws_access_key_id** (*Required if aws_secret_access_key is provided*): Your AWS Access Key ID. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_secret_access_key` and must **not** provide a `profile_name`.
33
-
- **aws_secret_access_key** (*Required if aws_access_key_id is provided*): Your AWS Secret Access Key. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_access_key_id` and must **not** provide a `profile_name`.
34
-
- **profile_name** (*Optional*): A credentials profile name. For more information, please see the [boto3 documentation section about credentials](http://boto3.readthedocs.io/en/latest/guide/configuration.html#shared-credentials-file).
35
-
- **region_name** (*Required*): The region identifier to connect to. The default is `us-east-1`.
36
-
- **name** (*Optional*): Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
32
+
| Parameter | Value | Description |
33
+
|---------------------|----------|-------------|
34
+
| `aws_access_key_id` | Required | Your AWS Access Key ID. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_secret_access_key` and must **not** provide a `profile_name` |
35
+
| `aws_secret_access_key` | Required | Your AWS Secret Access Key. For more information, please read the [AWS General Reference regarding Security Credentials](http://docs.aws.amazon.com/general/latest/gr/aws-security-credentials.html). If provided, you must also provide an `aws_access_key_id` and must **not** provide a `profile_name`. |
36
+
| `profile_name` | Optional | A credentials profile name. For more information, please see the [boto3 |
37
+
| `region_name` | Optional | The region identifier to connect to. The default is `us-east-1`. |
38
+
| `name` | Optional | Setting the optional parameter `name` allows multiple notifiers to be created. The default value is `notify`. The notifier will bind to the service `notify.NOTIFIER_NAME`.
39
+
|
40
+
| `text_type` | text/ssml | text or ssml: Specify wherever to use text (default) or ssml markup |
37
41
42
+
## Usage
43
+
Say to all `media_player` device entities:
44
+
```yaml
45
+
- service: tts.amazon_polly_say
46
+
data_template:
47
+
message: '<speak>Hello from Amazon Polly</speak>'
48
+
```
49
+
or
50
+
```yaml
51
+
- service: tts.amazon_polly_say
52
+
data_template:
53
+
message: >
54
+
<speak>
55
+
Hello from Amazon Polly
56
+
</speak>
57
+
```
58
+
59
+
Say to the `media_player.living_room` device entity:
0 commit comments