Git Product home page Git Product logo

paddleocr-ollama-translator's Introduction

Real-time Translator

A desktop application that provides real-time translation of selected screen areas using OCR technology and AI-powered translation.

Application Screenshot

Full Screen Application

Features

  • Real-time screen capture and translation
  • Support for multiple languages (English, Japanese, Traditional Chinese)
  • Customizable translation area selection
  • Movable and resizable translation overlay
  • Integration with Ollama for AI-powered translation
  • Adjustable screen scaling factor
  • GPU acceleration support for OCR (when available)

Demo

demo.mp4

Requirements

  • Python 3.9.19
  • PyQt6
  • PaddleOCR
  • Ollama
  • Other dependencies listed in requirements.txt

Installation

  1. Clone this repository:

git clone https://github.com/Travsh/paddleocr-ollama-translator.git cd paddleocr-ollama-translator

  1. Install the required Python packages:

pip install -r requirements.txt

  1. Ensure Ollama is installed and running on your system. You can download it from https://ollama.ai/

Usage

  1. Start the application:

python Translator.py

  1. Select the source language (English or Japanese) from the dropdown menu.

  2. Choose the target language for translation (Traditional Chinese or English).

  3. Adjust the scale factor if necessary (default is 150%).

  4. Click "Choose Area" and select the screen area you want to translate.

  5. Click "Show Translation" to start the real-time translation.

  6. The translated text will appear in a movable overlay window near the selected area.

  7. You can drag the translation window to reposition it as needed.

Configuration

  • Scale Factor: Adjust this if your display scaling is different from the default (150%).
  • Translation Model: Select the Ollama model you want to use for translation. (Recommended: "gemma2")

Troubleshooting

If you encounter any issues:

  1. Ensure Ollama is running and accessible at http://localhost:11434.
  2. Check that all required Python packages are installed correctly.
  3. Verify that your selected Ollama model supports the languages you're translating between.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License

Acknowledgements

  • Ollama for providing the AI translation capabilities.
  • PaddleOCR for OCR functionality.
  • PyQt6 for the GUI framework.

paddleocr-ollama-translator's People

Contributors

travsh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.