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

Update the list of Polly voices #5723

Merged
merged 2 commits into from Nov 30, 2022
Merged

Update the list of Polly voices #5723

merged 2 commits into from Nov 30, 2022

Conversation

daybarr
Copy link
Contributor

@daybarr daybarr commented Nov 30, 2022

moto.polly.resources was missing some voices added by AWS since this module was first created in September 2017 (in commit fcacecb).

We wanted to test code that uses "Camila", a voice for pt-BR, but that was missing so we had to monkey patch moto to add it. This PR does it properly so we can remove the monkey patch one day if this is accepted.

While I'm here, I also made the resources module easier to maintain by:

  • Adding a comment explaining how the VOICE_DATA can be obtained again in future by running an awscli command
  • Creating the LANGUAGE_CODES and VOICE_IDS sets dynamically from the VOICE_DATA, so maintainers only have to update the one thing manually, not three.

Had to update one test because with the addition of "Arthur" there are now 4 voices for en-GB, not 3.

LANGUAGE_CODES and VOICE_IDS can be created from existing VOICE_DATA so
do that to eliminate need for maintainer to keep in sync.
Using actual output from aws cli as of today.
Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for feeding this back into Moto @daybarr

@bblommers bblommers added this to the 4.0.11 milestone Nov 30, 2022
@bblommers bblommers merged commit 462fb23 into getmoto:master Nov 30, 2022
@github-actions
Copy link
Contributor

This is now part of moto >= 4.0.11.dev26

@daybarr daybarr deleted the update-polly-voices-signed branch November 30, 2022 21:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants