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

change AWS and GTTS max_chars #1029

Merged
merged 3 commits into from
Jul 22, 2022
Merged

change AWS and GTTS max_chars #1029

merged 3 commits into from
Jul 22, 2022

Conversation

swoker
Copy link
Contributor

@swoker swoker commented Jul 18, 2022

Description

previously aws TTS did not read out comments correctly and only made weird sounds with super short mp3s. This fixes the problem and allows the full comment to be read.

Issue Fixes

None

Checklist:

  • I am pushing changes to the develop branch
  • I am using the recommended development environment
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have formatted and linted my code using python-black and pylint
  • I have cleaned up unnecessary files
  • My changes generate no new warnings
  • My changes follow the existing code-style
  • My changes are relevant to the project

Any other information (e.g how to test the changes)

None

previously aws TTS did not read out comments correctly and only made weird sounds with super short mp3s. This fixes the problem and allows the full comment to be read.
@callumio
Copy link
Collaborator

Is that the max character or an arbitrary number? It was set to 0 (infinite) originally as I can't test on AWS

@swoker
Copy link
Contributor Author

swoker commented Jul 19, 2022

(I checked a different source before and didn't realize the 100k limit is only for async calls which is not used here, so I updated it to 3k)
3000 chars is the max limit for the synchronous API call: https://docs.aws.amazon.com/polly/latest/dg/asynchronous.html

using max_chars=0 only sends empty strings to AWS and thus produces weird sounds. This commit fixes that

@swoker
Copy link
Contributor Author

swoker commented Jul 20, 2022

PS: Saw a similar problem in #1036 and fixed the max_chars for GTTS as well.
Text limit should be 5000, as seen on https://translate.google.com/

@callumio callumio changed the title fix AWS_Polly TTS max_chars change AWS and GTTS max_chars Jul 20, 2022
@JasonLovesDoggo JasonLovesDoggo merged commit ea9763c into elebumm:develop Jul 22, 2022
@swoker swoker deleted the patch-1 branch July 22, 2022 14:42
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.

3 participants