Skip to content

How Can I Use A Different Voice for Amazon Polly

0

Hi, I'm not sure if this is where I can post my question, so I apologize if it's not the right place.

I am tryiing to figure out how I can use the "Stephen" voice for Amazon Polly, in Home Assistant. Looking at my 1 section of code below, it works fine. Then if I try to add the voice option (second section of code), I get an error.

data:
  cache: true
  message: >-
    "Hi, it's me Kyle! How can I help?"
  entity_id: media_player.colton_s_echo_show
action: tts.amazon_polly_say

When I add the voice options:

data:
  message: >-
    "Hi, it's me Polly! How can I help?"
  entity_id: media_player.colton_s_echo_show
  cache: true
  options:
    voice: Stephen
    engine: generative
language: en-US
action: tts.amazon_polly_say

Is there somewhere in my AWS account or Amazon Developer account that I need to activate "Stephen"?

3 Answers
0
Accepted Answer

Nevermind! I figured it out. In case someone else has this question, the answer is - set it up in your configuration.yaml file. Here's what I have in mine:

  - platform: amazon_polly
    aws_access_key_id: !secret aws_keyID
    aws_secret_access_key: !secret aws_accesskey
    voice: Stephen
    engine: generative
answered a year ago
EXPERT
reviewed a year ago
0

To use a different voice like "Stephen" for Amazon Polly in Home Assistant, you're on the right track with your code modification. However, there are a few things to consider:

  1. Voice availability: Make sure the "Stephen" voice is available in your region. Stephen is a Neural voice with an English (British) accent.

  2. Correct syntax: Your second code snippet is close, but needs a slight adjustment. The 'options' should be at the same level as 'cache', 'message', and 'entity_id'. Try this format:

data:
  cache: true
  message: "Hi, it's me Polly! How can I help?"
  entity_id: media_player.colton_s_echo_show
  options:
    voice: Stephen
    engine: neural
language: en-GB
action: tts.amazon_polly_say
  1. Engine type: Stephen is a Neural voice, so use 'neural' instead of 'generative' for the engine.

  2. AWS account setup: Ensure that your AWS account is properly set up and has the necessary permissions to use Amazon Polly. You don't need to specifically activate individual voices in your AWS or Amazon Developer account.

  3. Home Assistant configuration: Make sure your Home Assistant is correctly configured to use Amazon Polly, including the right AWS credentials.

If you're still encountering issues after making these adjustments, check the Home Assistant logs for more detailed error messages. This can help pinpoint if there's a problem with permissions, voice availability, or configuration.

Remember, you can always test different voices directly in the Amazon Polly console to ensure they work before implementing them in Home Assistant.
Sources
How Amazon Polly works - Amazon Polly
Listening to voices - Amazon Polly
Voices in Amazon Polly - Amazon Polly
Available voices - Amazon Polly

answered a year ago
EXPERT
reviewed a year ago
0

I edited my second snippet code. I need "Stephen" from the generative engine, from en-US.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.