STL a.k.a Screen Translate is an OCR translator tool made by utilizing Tesseract and opencv-python. The code is then compiled to .exe by using pyinstaller. Inspired by software such as Visual Novel Reader (VNR), Visual Novel OCR, and QTranslate. Also available to download at sourceforge.
If you use the installer version, you can run the uninstaller inside the app folder or uninstall it from control panel. For the portable (rar) version, you can just delete them.
Note \ It is recommended to create a virtual environment, but it is not required.
python -m venv venv
pip install -r requirements.txt
python Main.py
Warning \ As of now cx_Freeze setup is not working properly for DeepL scraper so use the pyinstaller script instead if you want to compile the app by yourself.
Before building, we gotta make sure that the dependencies and playwright driver is installed. For playwright (used for deepl scraper), we need to install the browser driver first, which is explained in the playwright documentation. It is stated there that if we want to bundle our code we need to run the following code first:
# bash
PLAYWRIGHT_BROWSERS_PATH=0 playwright install chromium
# powershell
$env:PLAYWRIGHT_BROWSERS_PATH="0"
playwright install chromium
# batch
set PLAYWRIGHT_BROWSERS_PATH=0
playwright install chromium
After dependencies are installed, we can start building the app. There are 2 options that i have provided for building, using pyinstaller or cx_freeze. The command used are:
For pyinstaller:
# On Source Code Directory
python build_pyinstaller.py
# you will be prompted to build with console or not
This will create a folder called dist
in the source code directory. Inside the folder there will be a folder called ScreenTranslate <version>
which contains the executable file.
For cx_freeze:
# On Source Code Directory
python build_cx.py build
# you will be prompted to build with console or not
This will create a folder called build
in the source code directory. Inside the folder there will be a folder called exe.<platform>-<version>
which contains the executable file.
I use innosetup to package the app. You can download it here. After installing it, you can setup the path and AppId in ScreenTranslate.iss
file and run the .iss script.
If you encounter any bugs with the program, please report them by opening an issue on the github repository. You can also request a feature by opening an issue or posting in discussion.
Check out my other similar project called Speech Translate a real time speech transcription and translation app made possible using whisper model from openAI.