Earu / EasyChat

A modular Garry's Mod chat addon for both users and developers. (EOL 2025)
https://steamcommunity.com/sharedfiles/filedetails/?id=1182471500
GNU General Public License v3.0
91 stars 31 forks source link

Yandex Translate API no longer gives free keys #60

Closed ghost closed 2 years ago

ghost commented 3 years ago

The included auto-translator uses the Yandex translate API, of which the free service has been discontinued for users. image Perhaps switching to an alternative API is an option? I'm not familiar with translation APIs myself so I couldn't give any recommendations. I know this would probably mean rewriting the way the addon handles the translate requests, but I still think the translate feature is very useful to have, especially when integrated into the addon like it is. Perhaps something along the lines of LibreTranslate would be preferable? https://libretranslate.com/

Earu commented 3 years ago

Yes it has been the case for a while now, there wasn't any proper alternative that we could find. But maybe your suggestion will work? I'll look into it.

Cynosphere commented 3 years ago

:/ image

Yeah its self hostable, but then that becomes a liability.

Earu commented 3 years ago

:/ image

Yeah its self hostable, but then that becomes a liability.

Oh then if that's the case I don't personally want to host it. I want EasyChat to continue living without having to maintain services like that. What if I get even more busy than I am currently ? Nobody is gonna be there to maintain it anymore. So the more independent it is, the better.

If you do have more free public APIs that we can use though, feel free to post them here 👍

Piehthyte commented 3 years ago

Google translate API is usable and free. I haven't had a problem with it. I wrote an AutoHotkey script to do autotranslations cause I talk to a loooooooooot of non-English speakers. It should work for you as well.

ghost commented 3 years ago

Google translate API is usable and free. I haven't had a problem with it. I wrote an AutoHotkey script to do autotranslations cause I talk to a loooooooooot of non-English speakers. It should work for you as well.

The Google Translate API is not free by any stretch of the imagination. The user accessible one on the Google Translate website is, but not the backend API. Creation of a bot that uses the frontend as if it were a user violates Google's Terms of Service and would result in a hell of a lot of problems, mainly legal ones. image

Unfortunately, it seems that the only option would be to self-host an API for translation. I would be happy to host such a thing using my own equipment for people to use, however I would most likely not be comfortable with having an unknown quantity of traffic constantly using up my network infrastructure, and would have little in the means to limit or cap such traffic without significantly impacting the user experience.

ghost commented 3 years ago

Update: I've been looking around, and it looks like the Watson Translate API may be a viable alternative:~ https://cloud.ibm.com/catalog/services/language-translator image

They claim that their free plans will remain free and won't charge you unless you explicitly opt-in to having a paid service. I'm not sure what 1 million characters works out to, (mathematically, that's ~233,000 characters per week or ~33,000 characters per day The only requirement to use the API is to sign up for an account.

Earu commented 3 years ago

Update: I've been looking around, and it looks like the Watson Translate API may be a viable alternative:~ https://cloud.ibm.com/catalog/services/language-translator image

They claim that their free plans will remain free and won't charge you unless you explicitly opt-in to having a paid service. I'm not sure what 1 million characters works out to, (mathematically, that's ~233,000 characters per week or ~33,000 characters per day The only requirement to use the API is to sign up for an account.

Sounds like a plan, I'll check it out eventually. I've been super busy lately so don't expect anything within the week.

Regarding:

Google translate API is usable and free. I haven't had a problem with it. I wrote an AutoHotkey script to do autotranslations cause I talk to a loooooooooot of non-English speakers. It should work for you as well.

That's what EasyChat used to do, but it was very limited in terms of queries you could do and most of all it was illegal, because it's an API that's only meant to be used by google internal services.

Earu commented 3 years ago

Okay, so I've been messing around with the IBM API a bit, and it doesn't really seem very user-friendly for a non IT versed person. And I obviously cannot have one key that will be public and for everyone to use, for obvious security reasons. If anyone wants to write a simple document for a lambda user, on how to get a key off IBM's service you are more than welcome.

Earu commented 2 years ago

Since Yandex still works despite the keys being paid, and no proper alternative has been found I'm going to close this issue. Feel free to re-open a similar issue if you think you've found a better solution.