Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Amazon Polly generative engine #32725

Merged
merged 4 commits into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions source/_integrations/amazon_polly.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand All @@ -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
Expand Down Expand Up @@ -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:

Expand Down