gtts.tts.gTTSError: 429 (Too Many Requests) from TTS API. Probable cause: Unknown

Question:

I’ve installed GTTS using pip with python and the first copule of iterations seemes fine. However now I keep getting this error:

gtts.tts.gTTSError: 429 (Too Many Requests) from TTS API. Probable cause: Unknown

I’ve removed it from a loop but it stil wont run, here is my code:

audio = gTTS(text="Hello World", lang='en', slow=False)
audio.save("audio.mp3")

How do i fix this, I’ve uninstalled, and waited for about an hour but Its not fixed. I’ve researched and all of the solutions are saying its an anti DDOS filter but I’ve waited and the error doesn’t show any indication to this.

Asked By: Haisi

||

Answers:

You may be blocked for longer than an hour. I would suggest waiting for longer, such as a day. After that if it works, then you can try to introduce an artificial wait by using time.sleep(10) before each request, which would pause program execution for 10 seconds. This way might help you to avoid being rate limited.

Answered By: archangel

The translate.googleapis.com site use is very limited. It only allows about 100 requests per one hour period and there after returns a 429 error (Too many requests). On the other hand, the Google Translate Api has a default billable limit of 5 requests/second/user and 200,000 requests/day."

The Google Translate API has a specific Google Group where many more people discuss that product since we don’t get too many questions about the API so you may find https://groups.google.com/forum/#!forum/google-translate-api very interesting to read.

Google Translate API does come with their own support located at https://cloud.google.com/support-hub/ as well since Google Cloud Platform can cost money (the API is something that can incur costs).

Answered By: ArmyHacks

The translate.googleapis.com site use is very limited. It only allows about 100 requests per one hour period and there after returns a 429 error (Too many requests). On the other hand, the Google Translate Api has a default billable limit of 5 requests/second/user and 200,000 requests/day."

The Google Translate API has a specific Google Group where many more people discuss that product since we don’t get too many questions about the API so you may find https://groups.google.com/forum/#!forum/google-translate-api very interesting to read.

Google Translate API does come with their own support located at https://cloud.google.com/support-hub/ as well since Google Cloud Platform can cost money (the API is something that can incur costs).

Answered By: Lê Linh
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.