An Electron-based screen translation tool that combines OCR and translation services.
- Screen capture and region selection
- Text recognition using PaddleOCR
- Translation services (Youdao/Bing)
- VLM Translation (GLM-4.1V-flash)
- Hotkey support for quick access
- Cross-platform support (Windows/macOS/Linux)
- Node.js 16+
- Python 3.7+
- Git
- Clone the repository:
git clone https://github.com/yourusername/ScreenTranslator.git
cd ScreenTranslator- Set up Python environment (for OCR service):
cd paddleocr2
python -m venv venv
venv\Scripts\activate # Windows
source venv/bin/activate # Linux/macOS
pip install paddlepaddle paddleocr flask pillow- Install Node.js dependencies:
cd ../app
npm install- Start the OCR service (in one terminal):
cd paddleocr2
python main.py- Start the Electron app (in another terminal):
cd app
npm start- Press the configured hotkey to capture screen region
- Selected text will be automatically recognized and translated
- Choose between traditional or VLM mode
Edit paddleocr2/main.py to modify:
- OCR language settings
- Server port (default: 6987)
Edit app/config/translateServer to change:
- Default translation service
- API endpoints
app/: Electron application (frontend)main.js: Main processpuppeteer.js: Translation handlingtools.js: Utility functions
paddleocr2/: OCR service (backend)main.py: Flask server with PaddleOCR
cd app
npm run dist- About PaddleOCR service packaging issues, please refer to: PaddleOCR Discussion #11490
- If using traditional translation mode, you need to download OCR service files and configure the OCR file path in the software. If using large model translation mode, you need to configure the API key in the software.
Contributions are welcome! Please open an issue or submit a pull request.
ISC © [ScriptLin]


