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

Too Many Requests #24

Open
seonake opened this issue Jan 6, 2021 · 9 comments
Open

Too Many Requests #24

seonake opened this issue Jan 6, 2021 · 9 comments

Comments

@seonake
Copy link

seonake commented Jan 6, 2021

Hi, i am getting this message:

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

How can avoid this? Do I need to wait? How long? or Do I need to do something else?
Many thanks.

@lushan88a
Copy link
Owner

Google recently restricted API use speed.
You can change IP or use slowly.

@petertadrous
Copy link

I got the same message and I used the proxies feature in the google_translator() function but still getting the same message. How would I go about changing the IP? Everything I've read involves passing a different IP to some sort of request but I'm not sure how to do that with this module

@raymond-edgerly
Copy link

raymond-edgerly commented Jan 12, 2021

Anyone know what Google's rate limit is? 🙂 I think I hit it too hard 🔨😛

google_new_transError: 429 (Too Many Requests) from TTS API. Probable cause: Unknown

Googled "Text-to-Speech API rate limit", but it only seems it's per minute/request 🤔
https://cloud.google.com/text-to-speech/quotas

I reduced my request to an amount that previously worked - still 429'd.

From what I can tell, it seems to be on a per day basis with TTS API, but I'm uncertain what it might be 🤔🙂

@jonas-nothnagel
Copy link

I am running into the same issue. I used to employ the old google translator library and iterated it over hundreds of paragraphs. Anyone has found a solution? @lushan88a could you provide some instructions for this for the Python implementation?

@jonas-nothnagel
Copy link

@megaman110101 Did you find a solution for this in your work?

@raymond-edgerly
Copy link

raymond-edgerly commented Jan 13, 2021

@jonas-nothnagel the 429 error disappeared in less than 24 hours.

I just returned a successful request for 40,328 English characters into 3 languages (124,940 characters returned) - whitespace included.

The limit might actually be somewhere in the neighborhood of 6m. I'll keep track today and see if/when I hit the limit 🙂👍

Update: Returned another 620,346 off that original 40,328 (more languages beyond the initial 3). So far, a total of 745,286 characters return "ok" within a period of 1 hour.

Update2: Another 30 mins later I tried to run the original again for Vietnamese translation and received 429 error. Google let me reach 745,286 first, but gave me the error some time later. 🤷‍♂️🤔🙂

Update3: After about 10 hours, the limit reset, and I was able to query again 👍

@jonas-nothnagel
Copy link

@megaman110101 thank you for checking and logging :) I think my best shot is to submit the tasks in batches. Unfortunately my translation code is embedded in a long function that I would like to run once a week to get an updated dataset. I think I need to re-write this then.
@lushan88a any solution in sight?

@kanchansapkota27
Copy link

Any help please tried to translate a list of 1600 strings i.e around 147,171 character length.
google_trans_new.google_trans_new.google_new_transError: 429 (Too Many Requests) from TTS API. Probable cause: Unknown

@Romczyslaw
Copy link

I tried to translate several hundred short lines of text and got the infamous 429 (shouldn't that raise an error?). The translated lines were in the list because I wanted to test a bulk translation. Maybe it is better to use a generator on a list with time.sleep(1) before yielding the translation function?

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

No branches or pull requests

7 participants