Skip to content

A real-time tool that captures a region of your screen, extracts English text with OCR, and instantly translates it to Turkish—ideal for story-based games and on-screen reading

Notifications You must be signed in to change notification settings

BilalSi20/Simultaneous-Translator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Real-Time On-Screen Translator for Story-Based Games

Project Description

This project provides a real-time translation tool for story-based games or any application where you want to instantly translate on-screen text. The script captures a specific region of your screen, performs OCR (Optical Character Recognition) to extract English text, and then translates it to Turkish using Google Translate. The translation is displayed in a temporary popup window for quick reference while playing or reading.

How It Works

  • Continuously takes screenshots of your screen.
  • Crops a user-defined region (ROI) where the text appears (e.g., dialogue box in a game).
  • Uses Tesseract OCR to extract English text from the cropped region.
  • Translates the extracted text to Turkish using the Deep Translator library.
  • Shows the translation in a small, semi-transparent popup window at the top right of the screen.
  • The selected region is also shown in a separate OpenCV window for visual feedback.
  • Press 'q' to exit the program at any time.

Usage

  1. Install requirements:
    pip install pyautogui opencv-python numpy pytesseract deep-translator
    • Also install Tesseract-OCR and set its path in the script.
  2. Set the coordinates:
    • Change the values of x1, y1, x2, y2 in the script to match the region where the text appears on your screen.
  3. Run the script:
    • The script will start capturing, translating, and displaying the results in real time.

Example Use Case

This tool is especially useful for:

  • Translating dialogue in story-based games that do not have Turkish language support.
  • Instantly understanding any on-screen English text in a specific region.

Notes

  • The translation popup window automatically closes after 1.5 seconds.
  • Make sure the selected region covers only the text area for best OCR results.
  • You can adjust the region and popup duration as needed.

This project is a practical solution for gamers and readers who want to quickly translate and understand on-screen English text in real time.

About

A real-time tool that captures a region of your screen, extracts English text with OCR, and instantly translates it to Turkish—ideal for story-based games and on-screen reading

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages