Skip to content

Commit

Permalink
Add support for Amazon Polly generative engine (#32725)
Browse files Browse the repository at this point in the history
* - add new engines
- add example of setting engine and voice per service call
- region_name is a string

* add links to engines
  • Loading branch information
jschlyter authored Sep 4, 2024
1 parent 99d008c commit 9a328b0
Showing 1 changed file with 17 additions and 2 deletions.
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

0 comments on commit 9a328b0

Please sign in to comment.