Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google TTS can't convert text longer than ~500-600 characters when using Neural2 voices

ih
Bronze 2
Bronze 2

According to Google TTS documentation, the Speech Synthesis Limit is 5000 bytes per request - https://cloud.google.com/text-to-speech/quotas.

However, when I use Neural2 voice (for example "es-US-Neural2-A"), I can't even convert 600 bytes per request. Instead, I receive an error message: google.api_core.exceptions.InvalidArgument: 400 Request contains an invalid argument. 

Converting text < 500 bytes works fine, so that's definitely not an "invalid argument" issue.

It looks like an issue on Google's side, but please let me know if you have any ideas on how to fix it.

Thank you

Solved Solved
1 10 11.5K
1 ACCEPTED SOLUTION

There is already an ongoing internal bug for this. For the meantime, possible workarounds would be, converting the text into <500 bytes as you mentioned or send the request into smaller pieces.

View solution in original post

10 REPLIES 10