Real-time screen text translator with OCR. Capture and translate text from any area of your screen instantly.
-
Multiple OCR Engines
- Tesseract OCR
- EasyOCR
- Windows OCR
-
Multiple Translation Engines
- Local API( Deeplx)
- Google Translate
- Gemini AI
-
User-Friendly Interface
- Customizable screen region selection
- Adjustable translation window opacity
- Dark/Light theme support
- Translation history
- Draggable translation window
-
Keyboard Shortcuts
- Support for both global and local shortcuts
- Fully customizable shortcut bindings
- Python 3.8 or higher
- Deeplx for local translation
- Tesseract OCR installed on your system
- Windows 10/11 (for Windows OCR support)
- NVIDIA GPU (optional, for faster EasyOCR processing)
-
Clone the repository
bash git clone https://github.com/yourusername/screen-text-translator.git cd screen-text-translator
-
Create and activate virtual environment (recommended) ```bash python -m venv venv
.\venv\Scripts\activate
source venv/bin/activate ```
-
Install required packages
bash pip install -r requirements.txt
-
Install Tesseract OCR
- Windows: Download installer from (https://github.com/tesseract-ocr/tesseract)
- Linux:
sudo apt-get install tesseract-ocr
- MacOS:
brew install tesseract
-
Configure environment variables
- Copy
.env.example
to.env
- Add your Tesseract installation path and API keys
- Copy
-
Start the application
bash python screen_translator.py
-
Select screen region
- Click "Select Screen Region" button or press
Ctrl+R
- Click and drag to select the desired area
- Click "Select Screen Region" button or press
-
Start translation
- Click "Start Translation" button or press
Ctrl+Space
- The translation will appear in a floating window
- Click "Start Translation" button or press
Shortcut | Action |
---|---|
Ctrl+Space |
Start/Stop Translation |
Ctrl+R |
Select New Region |
Ctrl+T |
Change Translation Engine |
Ctrl+O |
Change OCR Engine |
Ctrl+H |
Show Translation History |
Esc |
Stop Translation |
The application settings can be configured through the UI or by editing config.json
:
- Translation window opacity
- Default languages
- Preferred OCR and translation engines
- Global shortcuts enable/disable
- Game mode
- Always on top
-
Tesseract not found
- Ensure Tesseract is installed
- Set correct path in
.env
file - Verify installation by running
tesseract --version
-
EasyOCR installation fails
- Update pip:
pip install --upgrade pip
- Install Visual C++ Build Tools (Windows)
- Try installing torch separately first
- Update pip:
-
Windows OCR not working
- Ensure you're running Windows 10/11
- Install Windows OCR language packs
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.