A powerful real-time screen translation tool written in Python. Originally designed with visual novels like Danganronpa in mind, this application allows you to select any region on your screen and automatically translates the text contained within that region from English to Vietnamese.
- Region Selection: Manually draw a bounding box around the dialogue or text you want to track on your screen.
- Auto Translate Loop: The application automatically scans the selected region every 1.5 seconds. If new text appears, it uses OCR to read the text and translates it instantly without any manual input!
- Smart Memory: It remembers the last translated sentence to prevent redundant translations and save bandwidth.
- Transparent Overlay: Translated Vietnamese text is displayed dynamically in a sleek, non-intrusive transparent overlay window at the bottom of the screen.
- Manual Trigger: Press
F9at any time to force a re-translation of the current screen region.
Ensure you have Python 3.8+ installed.
-
Clone the repository:
git clone https://github.com/tridpt/ScreenTranslator.git cd ScreenTranslator -
Run the Script: You can run the script via command line:
python main.py
Or simply double-click the
run.batfile if you are on Windows.
- Start the application. The screen will slightly dim.
- Click and drag your mouse to create a rectangular selection box over the text area (e.g., the game's dialogue box).
- The translation overlay will appear at the bottom.
- Play your game! The script runs silently in the background and will auto-translate text whenever it detects an update in the selected region.
- Press
F9if you need to manually force a translation. - Hold
Escto safely exit the application.
Developed by Trần Đức Trí.
Leverages Python ctypes for DPI awareness, keyboard for global hotkeys, and multi-threading to ensure the game performance is unaffected during OCR scanning.