Giter VIP home page Giter VIP logo

Comments (16)

moonstar-x avatar moonstar-x commented on July 17, 2024 2

Thanks for the suggestion, I'll implement this until a fix can be found on the original library.

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024 1

Thanks for the report.

It seems that Google is migrating their translate API and is rendering multiple libraries that made use of it useless.

What's great though is that it seems that there's already an effort being put onto finding a solution for this, so all that remains is to wait.

I'm sorry for the trouble that all this may be causing you but sadly this is an issue affecting plenty of users of the translate API. :(

I'm gonna leave this issue open as reference.

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

Hey there, I see your console has a CJK language font, are you located in China by any chance? Is your region blocking https://translate.google.com?

from discord-tts-bot.

ChiseLai avatar ChiseLai commented on July 17, 2024

Hey there, I see your console has a CJK language font, are you located in China by any chance? Is your region blocking https://translate.google.com?

I’m actually living in Hong Kong so I don’t think it has blocked translate.google.com
Where the bot can still speak texts it will sometime stuck in this little bug and it needs someone to input another speak command again before it starts talking again

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

Unfortunately, you're hitting this error: zlargon/google-tts#27 (Which is a bit out of my hands).

The issue hasn't been very well discussed either so there's no way to tell what's happening other than your ISP may be blocking some requests to https://translate.google.com. I know that Google isn't blocked in Hong Kong so it is a bit weird that you're getting that particularly error.

I'm gonna have to close this issue because it isn't technically related to this bot but with the google-tts dependency which I cannot change because it's the only one that does Google TTS with no Google Cloud Platform account (which isn't free).

A solution I can offer you is to add the bot that I'm hosting to your own server. (Though you may need to wait a bit because I'm in the process of getting the bot verified)

from discord-tts-bot.

solyarisoftware avatar solyarisoftware commented on July 17, 2024

BTW, I guess the issue is not related exclusively from the region: it's for "google-inside". See: zlargon/google-tts#33 (I'm from Italy).

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

You are quite right, apparently location isn't a factor here. My service is hosted in Ecuador and now that I decide to check its logs I spot this same error.

image

The randomness of this issue is quite unfortunate, makes it more complicated to fix it. I'll see what I can do. (Thanks for the heads up @solyarisoftware )

from discord-tts-bot.

solyarisoftware avatar solyarisoftware commented on July 17, 2024

BTW, I'm experiencing the error just now (last few weeks).
Workaround (not rocket-science): because the google API rais error occasionally,
in my case I retry few times until I got success. Here the ugly pseudocode:

for (;;) {
callGoogleAPI(...)
if success 
  break
sleep(few msecs)
}  

from discord-tts-bot.

ChiseLai avatar ChiseLai commented on July 17, 2024

Oh my god thank you so much
I have suffered quite a lot by this bug for a week now, trying to debug in every single way with my limited knowledge of coding and API understandings
I have tried to change host from translate.google.com to translate.google.cn (Since I once believed that I might have to use the China one to fix it)
I also have tried to see if it is my network connection problems, tried to even get a new adapter and change IP to see if that is helpful
Also tried to turn on VPN to see if this might do something
Thank you so much for looking into this

---Edit---
Sorry for sounding so stupid for asking this question, but is that ok if I ask where should I add this part of the fix in the bot folder?
I tried not to be so disturbing but I would be appreciate if you can help me on this part, thanks <(_ _)>

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

Hey there, sorry for the long time it took me to respond to you, school has been very time consuming and didn't even see your edited message.

I updated the dependencies in #26 because the creator of the google-tts library made an update to do the retry solution. All you need to do is pull the changes from master with

git pull origin master

Then remove the node_modules folder and reinstall the dependencies.

rm -rf node_modules && npm install

Sorry once again for taking way too long with this.

from discord-tts-bot.

ChiseLai avatar ChiseLai commented on July 17, 2024

Sorry for mentioning this issue in this closed issue thread
but seems like the similar issue with the google-api module is happening again
and this time its related to the get token key failed from google issue
I do know it is better to open a new issue thread for this, but since I think its the same category issue so I have decided to put it here
Also, I found that this issue makes the bot unable to speak a single sentence, unlike the inconsistent error appearing last time
image

from discord-tts-bot.

Watifu avatar Watifu commented on July 17, 2024

npm [email protected] has get key error and no updates .-.

from discord-tts-bot.

ChiseLai avatar ChiseLai commented on July 17, 2024

Don't worry we can wait for it
And again, its already great to hear that people are starting to look for solutions on it :D

from discord-tts-bot.

longphuc110 avatar longphuc110 commented on July 17, 2024

I fixed it by updating the google-tts-api version again. Try again: npm i [email protected]

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

Thanks for the suggestion. I just checked how the change went and quite unfortunately it is provisional. I'm gonna update the package.json to have this version but I'm considering using another/writing my own library for the API change,

I'm gonna leave this issue still open because I know for a fact that the 0.0.6 version will break again.

from discord-tts-bot.

moonstar-x avatar moonstar-x commented on July 17, 2024

This issue is fixed in #28. Please update your bot by pulling the changes in master, removing the node_modules folder and reinstalling the dependencies with npm install.

Sorry for taking too long, uni has been very demanding as of lately! :(

from discord-tts-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.