Code Monkey home page Code Monkey logo

subtitle-translator's Introduction

Real-Time Translation and Text Recognition with Python

This Python script demonstrates real-time translation of text captured from the screen using OCR (Optical Character Recognition) and DeepL API. The translated text is displayed on a Pygame window.

alt tag

Features:

  • Utilizes the EasyOCR library for text recognition from images.
  • Implements DeepL API for language translation.
  • Uses Pygame for creating a simple display window.
  • Captures a portion of the screen using MSS (Python Screen Capture).
  • Continuously updates the translated text in real-time.

Prerequisites:

  • Python 3.x
  • numpy, matplotlib, PIL, pygame, easyocr, mss, and deepl-python libraries. Install them using pip install.

Usage:

  1. Clone the repository or download the script file.
  2. Install the required Python packages mentioned in requirements.txt.
  3. Replace auth_key variable with your DeepL API authentication key.
  4. Run the script. It will open a Pygame window displaying the translated text.

How it Works:

  1. The script captures a specified portion of the screen using MSS.
  2. It recognizes text from the captured image using EasyOCR.
  3. The recognized Dutch text is translated into English using DeepL API.
  4. The translated text is displayed on a Pygame window.
  5. The process repeats continuously, updating the translated text in real-time.

Notes:

  • Ensure that the screen capture bounding box is adjusted according to your screen resolution and the area of interest.
  • DeepL API requires an authentication key which can be obtained by signing up on the DeepL website.

License:

This project is licensed under the MIT License.

subtitle-translator's People

Contributors

alessandro-oe avatar ale93111 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.