A real-time screen translation overlay tool that captures text from your screen, translates it, and displays the translation directly over the original content.
- Real-time Translation Overlay: Translates text on your screen and displays it in the same position as the original
- Multiple Translation Services: Supports Google Translate, DeepL, and Baidu Translation
- Customizable Appearance: Adjust text color, font, size, and window transparency
- Smart Text Detection: Uses EasyOCR to accurately detect text in various languages
- Auto-Update Mode: Continuously monitors screen content and updates translations when changes are detected
- Dual-View Option: View original OCR text alongside translations in a separate tabbed window
- Translate foreign language games in real-time while playing
- Read international websites in your preferred language
- Translate software interfaces and documentation
- Follow video content in foreign languages
- Assist with language learning by showing side-by-side translations
- Python 3.12 or higher
- Pip package manager
OverText requires the following Python libraries:
- tkinter
- Pillow
- scikit-image
- deep-translator
- easyocr
- numpy
- Clone the repository:
git clone https://github.com/SiENcE/overtext.git
cd overtext
- Create and activate a virtual environment (recommended):
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
- Install required packages:
pip install -r requirements.txt
Note: Some systems may need to install tkinter separately:
- On Ubuntu/Debian:
sudo apt-get install python3-tk
- On Fedora:
sudo dnf install python3-tkinter
- On macOS with Homebrew:
brew install python-tk
- On Windows: Tkinter is included with the standard Python installation
- Start OverText:
python OverText.py
- Launch OverText
- Position the transparent overlay window over the text you want to translate
- Adjust the window size using the control panel or by dragging the edges
- Set your source and target languages in the Translation tab
- Click "Capture & Translate" to perform a one-time translation
- For continuous translation, check "Auto Update" in the Capture tab
- Adjust the width and height of the overlay
- Set the window transparency level
- Toggle the window frame on/off
- Show/hide the tabs window for viewing original OCR text
- Choose text color
- Select font family and size
- Toggle bold text formatting
- Set fixed font size or use auto-detected size based on original text
- Set source language (use "auto" for automatic detection)
- Select target language
- Choose translation service (Google, DeepL, or Baidu)
- Enter API keys for premium services
- Enable/disable auto-update mode
- Adjust update interval (how often the screen is checked for changes)
- Set change threshold (how much the screen must change to trigger a new translation)
- Choose comparison method for detecting changes
- Escape: Quit application
- Ctrl+T: Capture and translate
- Ctrl+C: Clear translations
- Ctrl+Tab: Toggle tabs window
OverText supports a wide range of languages through the integrated OCR and translation services:
- For OCR: All languages supported by EasyOCR including English, Chinese, Japanese, Korean, Russian, and many European languages
- For translation: All languages supported by the selected translation service
Use standard language codes like:
- English: "en"
- German: "de"
- French: "fr"
- Spanish: "es"
- Japanese: "ja"
- Chinese: "zh"
For some translation services, you'll need to provide API keys:
- DeepL: Required for premium service with higher quota
- Baidu: Requires both App ID and API Key
- OCR accuracy may vary depending on text font, color, and background
- Some specialized terminology may not translate accurately
- Performance may be affected when translating large amounts of text
- Anti-aliased text on high-DPI screens may require additional tuning for best results
Text detection not working properly:
- Try adjusting the window transparency for better OCR results
- Ensure high contrast between text and background
- Check that the correct source language is selected
Slow performance:
- Reduce the overlay window size to capture less area
- Increase the update interval in auto-update mode
- Use a smaller font size
Translation errors:
- Verify API keys are entered correctly
- Check internet connection
- Ensure language codes are valid
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the Creative Commons Attribution-NonCommercial 4.0 International License - see the LICENSE file for details.
This means:
- You are free to share (copy and redistribute) and adapt (remix, transform, and build upon) this material
- You must give appropriate credit and indicate if changes were made
- You may not use the material for commercial purposes
- No additional restrictions — you may not apply legal terms or technological measures that legally restrict others from doing anything the license permits
- EasyOCR for text recognition
- deep-translator for translation services
- Pillow for image processing
- scikit-image for image comparison