Add support for Amazon Polly generative engine (#32725)

* - add new engines
- add example of setting engine and voice per service call
- region_name is a string

* add links to engines
This commit is contained in:
Jakob Schlyter 2024-09-04 08:29:01 +02:00 committed by GitHub
parent 99d008cf95
commit 9a328b01a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -54,7 +54,7 @@ profile_name:
region_name:
description: The region identifier to connect to.
required: false
type: [string, list]
type: string
default: us-east-1
text_type:
description: "Whether to interpret messages as `text` or as [`ssml`](https://docs.aws.amazon.com/polly/latest/dg/ssml.html) by default."
@ -76,7 +76,7 @@ sample_rate:
type: string
default: 22050 for MP3 and Ogg Vorbis, 16000 for pcm
engine:
description: "Override the default engine. Can be either of `standard` or `neural`. See Amazon documentation for compatible regions and voices."
description: "Override the default engine. Can be either of [`standard`](https://docs.aws.amazon.com/polly/latest/dg/standard-voices.html), [`neural`](https://docs.aws.amazon.com/polly/latest/dg/neural-voices.html), [`long-form`](https://docs.aws.amazon.com/polly/latest/dg/long-form-voices.html) or [`generative`](https://docs.aws.amazon.com/polly/latest/dg/generative-voices.html). See Amazon documentation for compatible regions and voices."
required: false
type: string
default: standard
@ -127,6 +127,21 @@ Say with break:
Amazon Polly
</speak>
```
Say with specific voice and engine as options:
```yaml
- service: tts.amazon_polly_say
data:
message: "Hello from Amazon Polly"
entity_id: media_player.living_room
language: en-GB
options:
voice: Amy
engine: generative
```
## Advanced usage
Amazon Polly supports accented bilingual voices and you may find that you'd prefer the voice you like be slowed down, or speeded up. If the speed of the voice is a concern, Amazon Polly provides the ability to modify this using SSML tags. First enable SSML in configuration: