yplassiard / nvda-translate

Make NVDA translate any spoken text to the desired language.
GNU General Public License v2.0
20 stars 12 forks source link

Add DeepL API support #15

Open ultrasound1372 opened 2 years ago

ultrasound1372 commented 2 years ago

The DeepL service provides extremely accurate machine translation for a growing number of languages, though not all of them just yet. In my personal experience its Japanese translations blow Microsoft, Google and Yandex out of the water with how understandable they are, and it does well with the test of taking text in English, translating it to Japanese and then translating the result back. The website has an API and python library already, though the user of course has to provide auth keys. I request the ability to select this service for the languages it supports, the choice of a free or pro server, and a field to enter an API key. Perhaps if this fails you could fall back to the system you're already using, this would cover the case of missing API keys or languages it can't detect. This would vastly improve the understandability of many dialogs in Japanese games I suspect.

ultrasound1372 commented 2 years ago

Apparently the Python library doesn't need the user to choose between a free or pro server, it can differentiate that on its own. I don't imagine you'd be embedding the entire library though so you might have to replicate that functionality, or if you're going to wrap it with requests you certainly would.