Skip to content

fnx4/Screen-Translate

 
 

Repository files navigation

Screen Translate Logo

Screen Translate - An Easy to Use OCR Translator

Total alerts Language grade: Python GitHub issues GitHub pull requests
GitHub release (latest SemVer) GitHub commits since latest release (by date)
GitHub Repo stars GitHub forks

STL a.k.a Screen Translate is an OCR translator tool made by utilizing Tesseract and opencv-python. The code is then compiled to .exe by using pyinstaller. Inspired by Visual Novel Reader (VNR), Visual Novel OCR, and QTranslate. Also available to download at sourceforge

Jump to



Screen Translate Looks

Features

  • Translation
  • OCR Detection
  • Snip and translate
    ExampleScreen Translate Looks
  • Capture and translate
    ExampleScreen Translate LooksScreen Translate Looks

What can i use this for?

  • You can use this just to translate text from one language to another
  • You can use this to capture and translate text from documents, games, pictures, etc.
  • You can use this to just capture the text if you wanted to by setting the tl engine to None.

FAQ

  • [Q] How do i use this?
    [A] You can look at the user_manual folder or below for more information
  • [Q] Is this safe?
    [A] Yes, it is completely safe. If your antivirus detect this program as a virus, it's only a false positive. If you don't believe it, you can take a look at the code yourself.
  • [Q] What do you mean by a "clear enough" text?
    [A] It means the text is not too blend it with the background. If the text is light the background needs to be darken, so it is easier to be read, somewhat like that. But, this has been improved with some tricks which you can experiment with in the settings.

Requirements

For User

  • tesseract, needed for the ocr. Install it with all the language pack.
  • Internet connection

For Dev

  • Python 3.5+, checked using vermin (I am using python 3.9.6)
  • Install the dependencies You can install them by running pip_install.bat or by typing pip install -r requirements.txt.

Downloads

How To Install and Setup

For User

  1. Download the latest release of this program
  2. Install tesseract, make sure to select install all language pack when prompted
  3. Open the ScreenTranslate.exe
  4. Check settings, make sure tesseract location is correct
  5. Set monitor scaling to 100% so that image is captured accurately (If scaling is not set to 100% you will need to set offset in setting) (Recommended)
  6. Set offset if on multiple monitors. (Optional)
  7. Try capturing image and see if it works or not, if it doesn't, go check the image captured in img_captured folder. If it still doesn't work, try to change the offset.
  8. Now that you have set everything, the app should be ready. Feel free to submit new issue on the github repository if you encounter any bugs.

For Dev

  1. Clone the repo or download the source code of the latest release
  2. Setup virtualenviroment if needed then Install all the dependencies for the project.
# On source code directory
# Create a virtualenviroment with the name STL_Venv
python -m venv STL_Venv

# Activate the virtualenviroment
source STL_Venv/bin/activate

# Install the dependencies
pip install -r requirements.txt
  1. Install tesseract, make sure select install all language pack when prompted
  2. Run and test the source code
  3. If everything works, you can run the app normally running the ScreenTranslate.py file or using the TempRun.bat

if everything works and you have a suggestion or improvement, you can submit a pull request on the github repository. I will check if it's a good idea to add it.

How To Uninstall

If you use the installer version, you can run the uninstaller inside the app folder or uninstall it from control panel. For the portable (rar) version, you can just delete them.

How To Compile It To .exe Yourself

You can use p2exe or many other stuff. I use pyinstaller to compile it.
There are 2 options for compiling, command used are:

# On Source Code Directory
# With console window
pyinstaller ScreenTranslate_Console.spec

# No console window
pyinstaller ScreenTranslate_NoConsole.spec

# If installing using virtualenviroment
# Change STL_Venv to your virtualenviroment name
# With console window
pyinstaller --paths STL_Venv/lib/site-packages ScreenTranslate_Console.spec

# No console window
pyinstaller --paths STL_Venv/lib/site-packages ScreenTranslate_NoConsole.spec

Read this stackoverflow post to learn more on how to do it.

How To Use

  1. Select Language
  2. Translate or Capture Image using the capture window or the snipping feature
  3. Set hotkeys and delays as needed
  4. Set offset if needed (Usually when scaling is not 100% or when using multiple monitors)
  5. Done

For more information you can check the user_manual folder

Reporting bugs and feature requests

If you encounter any bugs with the program, please report them by opening an issue on the github repository. You can also request a feature by opening an issue.

Credits

Icons are taken from Icons8

Disclaimer

This is a free open source software, you can use it for any purpose. However, I am not responsible for any damage caused by this software. Use it at your own risk. (It won't create any damage though don't worry). This is also non profit, I gain no money from creating this.

About

A Screen Translator/OCR Translator made by using Python and Tesseract, the user interface are made using Tkinter. All code written in python.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%