This program will extract text from images and translate it into a selected language using the DeepL API.
In order to get your API key, you need to go Deepl Api Pricing Website and chose your plan by creating an account. Then copy your API key.
Then you make a .env
file and introduce your api like:
APIKEY = "9f43f-38...59rj"
This are the commands you need to execute in shell on the directory you want to have the program.
git clone https://github.com/SymbiontZ/screen-translator.git
cd screen-translator/
python -m venv env
.\/.env/Scripts/activate
pip install -r requirements.txt
Additionally, you need to install Tesseract OCR, which is necessary for converting images to text. Installation guide here
Then you just need to execute app.py
:)
After executing python app.py
, a window will open:
-
Choose the language to translate from and the language to translate to.
-
Press the Translate! button.
Once you press the button, a snipping tool window will appear, similar to the one in Windows. Select the section of the screen you want to translate.
Finally, when you release the mouse button, another window will appear with the translation.
Please note that the translation may not be perfect, but it works for the majority of cases.