interpreter
interpreter copied to clipboard
This application can translate text captured from any application running on your computer.
Interpreter
This app can translate text captured from any application running on your computer. You just need to specify which window you want to sample and that's it.
The app uses:
- Google Cloud Vision to Extract the text on-screen
- Google Translate or DeepL to translate it
The translated text is then displayed as subtitles on a floating window that you can move anywhere.
It's typically used to translate Japanese retro games unreleased in the US but you can use for anything you wish to translate!
How to use
Check the video tutorial
Prerequisites
Before you can use this app, you need some prerequisites:
- A Google Cloud account.
- Alternatively, you can use DeepL instead of Google Translate for translation.
Setting up your Google Cloud account
- Get a free Google Cloud account here or use your existing account.
- Create or Select a project
- Enable billing
- Enable Cloud Vision API
- Enable Cloud Translation (You can skip this step if you're using the DeepL API)
- Create Service Accounts and Keys
- Use the Service Account Key File in Your Environment
- Update the configuration file accordingly:
translator:
api: "google"
to: "en" # Target language
Note: The list of Google Translate supported language is available here.
(Optional) Setting up your DeepL account
As an alternative to Google Translate, you can use DeepL translate:
- Get a free DeepL account here or use your existing account.
- Update the configuration file accordingly:
translator:
api: "deepl"
to: "en" # Target language
authentication-key: "your-deepl-authentication-key"
Note: The list of DeepL supported language is available here.
Creating the default configuration file
If you run interpreter
and no configuration file is found, interpreter
will create the default
configuration file in the current folder and then exit.
You can make the required change to the configuration file after that.
Once you are done, you can run interpreter
again to start translating an application.
Configure Interpreter
Update the config.yml
configuration file:
window-title: "change me" # Title of the window you want to capture. It can be any part of the window title, for instance "Tales" for "Tales of Phantasia".
refresh-rate: "5s" # How often a screenshot is taken
confidence-threshold: 0.9 # Between 0 and 1. Filters out any OCR character with a confidence score below the threshold.
translator:
api: "google" # "google" or "deepl"
to: "en" # Target language. For Google translate, please check here: https://cloud.google.com/translate/docs/languages. For deepL, please check here: https://www.deepl.com/en/docs-api/translating-text
authentication-key: "deepl-auth-key" # required only for deepL
subs:
font:
color: "#FFFFFF" # RGB color code
size: 48 # Font size
background:
color: "#404040" # RGB color code
opacity: 0xD0 # Between 0x00 (transparent) and 0xFF (opaque)
Why does my virus-scanning software think interpreter
is infected?
This is a common occurrence, especially on Windows machines, and is always a false positive. Commercial virus scanning programs are often confused by the structure of Go binaries, which they don't see as often as those compiled from other languages.
Read more about it here