From 9a328b01a40b121a470475cb34847329c48e598c Mon Sep 17 00:00:00 2001 From: Jakob Schlyter Date: Wed, 4 Sep 2024 08:29:01 +0200 Subject: [PATCH] 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 --- source/_integrations/amazon_polly.markdown | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/source/_integrations/amazon_polly.markdown b/source/_integrations/amazon_polly.markdown index b0c8284c4d6..9e552cb010e 100644 --- a/source/_integrations/amazon_polly.markdown +++ b/source/_integrations/amazon_polly.markdown @@ -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 ``` + +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: