Pyugt

Latest version: v1.0.10

Safety actively analyzes 679296 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.0.6

pyUGT is a pure-python universal game translator: it takes screenshots from a region you select on your screen, uses OCR (via Tesseract v5) to extract the characters, then feeds it to a machine translator to then show you a translated text. It can use online machine translator for higher accuracy such as Google Translate or DeepL, but it also includes an offline translator called Argos, so that this app can fully run offline.

Since it works directly on images, there is no need to hack the game or anything to access the text, so it works on games where there is no text hooks, such as games in an emulator. It is also cross-platform (support for Windows and Linux - experimental support for MacOSX).

Changes:

* add: new shortcut CTRL+P to display a preview of the preprocessed image that will be fed to the OCR. This allows to tweak the preprocessing parameters in realtime in the config.ini file, and see the results directly. This is inspired by a similar feature by [Visual Novel OCR](https://visual-novel-ocr.sourceforge.io/#h.fikow7ge3ky) (Kudos to the dev for the great app and workflow! Unfortunately it is closed source and appears not maintained anymore).

To install on Windows:

* First, install Tesseract v5, installers are provided by [UB Mannheim](https://github.com/UB-Mannheim/tesseract/wiki). Make sure to install the additional languages you want to translate from (eg, Japanese, there is support for both horizontal and vertical Kanji).
* Then download the pyugt_v1.x.x_bin_win64.zip file attached below (where v1.x.x is the version number of the current release), which contains the pre-bundled binary. Unzip this folder anywhere.
* Inside the unzipped pyugt_v1.x.x_bin_win64 folder, execute pyugt.exe, then follow the instructions in the console window that appears. Essentially, press CTRL+F2 for the first translation, to select the region to translate, then CTRL+F3 for next translations.
* Edit config.ini inside this folder to change parameters. You can change the parameters on-the-fly while the app is launched, they will be used for the next translations in realtime.

To install on other platforms, it's necessary to install from source, please read the detailed instructions in the README.md.

Tested on Windows 10 x64 with Python 3.10.8 Miniconda3.

Note that due to the inclusion of the offline machine translator Argos, the filesize has dramatically increased, from 11MB before to 200MB zipped and 1GB unzipped! Although this is much bigger than before, we believe that it's worth including the Argos translator given the huge benefits. But for those who do not need it, it's possible to repack with pyinstaller and exclude Argos.

Note that the language packs for the OCR nor for the offline translator Argos are included, you have to download them separately, which increase further the storage space requirements, so expect to need about 2GB to 3GB of free space in total.

Argos language packs can be downloaded from [this index](https://www.argosopentech.com/argospm/index/) (and note that IPFS links are provided, hence Argos is very future-proof! Kudos to the devs for thinking about everything and providing such a wonderful tool in open-source!).

Note: 32-bits binaries are not provided anymore because of the offline translator Argos Translate which requires CTranslate2, a library that only provides 64-bits builds (although it seems it's possible to manually build a 32-bit release according to the forums, but that's a lot of overcomplication for a small project like pyugt - but if you manage to do that, PRs are welcome!).

1.0.3

pyUGT is a pure-python universal game translator: it takes screenshots from a region you select on your screen, uses OCR (via Tesseract v5) to extract the characters, then feeds it to a machine translator to then show you a translated text. It can use online machine translator for higher accuracy such as Google Translate or DeepL, but it also includes an offline translator called Argos, so that this app can fully run offline.

Since it works directly on images, there is no need to hack the game or anything to access the text. It is also cross-platform (support for Windows and Linux - experimental support for MacOSX).

In this major release, the first stable release, we overhauled the machine translation backend, so that we now offer 3 different backends, including an offline opensource machine translator directly bundled with the app, so that it is future-proof!

Changes:

* fix: googletrans module stopped working. Replaced by translators module, which provides many other public free API endpoints to various online machine translators.
* add: DeepL online machine translator via the official deepl module with free or paid API subscription. This provides the currently best in class japanese->english machine translator, and it is not throttled, but the number of translations in the free plan is limited per month, then a paid plan can be subscribed for more.
* add: Argos Translate open-source free offline machine translator based on OpenNMT and the Opus dataset. This provides a machine translator that is less reliable than online services but works without an internet connection and will always work (although the language files must first be fetched online), so this future-proof pyugt, as now pyugt does not rely solely on (free) online services that may close someday!
* fix: separate config_internal.ini to store internal variables that must be memorized between multiple app's runs, from config.ini which stores user-defined parameters, so that we do not overwrite config.ini and hence leave the user config file untouched (this preserves comments for example!).
* add: reload config parameters at each translation, so that config parameters can be modified on-the-fly and changes are reflected in the app in realtime.
* fix: various small bugfixes and refactoring (eg, translate_any() reused in the two methods/functions allowing a translation).
* misc: bump software status from alpha to stable/production > v1.0.0 !

To install on Windows:

* First, install Tesseract v5, installers are provided by [UB Mannheim](https://github.com/UB-Mannheim/tesseract/wiki). Make sure to install the additional languages you want to translate from (eg, Japanese, there is support for both horizontal and vertical Kanji).
* Then download the pyugt_v1.0.3_bin_win64.zip file attached below, which contains the pre-bundled binary. Unzip this folder anywhere.
* Inside the unzipped pyugt_v1.0.3_bin_win64 folder, execute pyugt.exe, then follow the instructions in the console window that appears. Essentially, press CTRL+F2 for the first translation, to select the region to translate, then CTRL+F3 for next translations.
* Edit config.ini inside this folder to change parameters. You can change the parameters on-the-fly while the app is launched, they will be used for the next translations in realtime.

Tested on Windows 10 x64 with Python 3.10.8 Miniconda3.

Note that due to the inclusion of the offline machine translator Argos, the filesize has dramatically increased, from 11MB before to 200MB zipped and 1GB unzipped! Although this is much bigger than before, we believe that it's worth including the Argos translator given the huge benefits. But for those who do not need it, it's possible to repack with pyinstaller and exclude Argos.

Note that the language packs for the OCR nor for the offline translator Argos are included, you have to download them separately, which increase further the storage space requirements, so expect to need about 2GB to 3GB of free space in total.

Argos language packs can be downloaded from [this index](https://www.argosopentech.com/argospm/index/) (and note that IPFS links are provided, hence Argos is very future-proof! Kudos to the devs for thinking about everything and providing such a wonderful tool in open-source!).

0.5.2

pyugt is a pure-python universal game translator: it takes screenshots from a region you select on your screen, uses OCR (via Tesseract v5) to extract the characters, then feeds it to a machine translator (Google Translate) to then show you a translated text.

Since it works directly on images, there is no need to hack the game or anything to access the text. It is also cross-platform (support for Windows and Linux - experimental support for MacOSX).

Changes:

* fix: regression that made the translation starts before the user finished the selection of a region to capture.

Keep in mind this is an alpha (and may forever stay in this state), but it is working (tested on Windows 10 x64 with Python 3.7 Anaconda).

0.5.1

pyugt is a pure-python universal game translator: it takes screenshots from a region you select on your screen, uses OCR (via Tesseract v5) to extract the characters, then feeds it to a machine translator (Google Translate) to then show you a translated text.

Since it works directly on images, there is no need to hack the game or anything to access the text. It is also cross-platform (support for Windows and Linux - experimental support for MacOSX).

Changes:

* fix: Rework entire GUI to fix memory leaks and random crashes (issue 1), by running all windows in their own threads and reusing the windows and just update the content. This is a significant stability improvement.

Keep in mind this is an alpha (and may forever stay in this state), but it is working (tested on Windows 10 x64 with Python 3.7 Anaconda).

0.4.10

pyugt is a pure-python universal game translator: it takes screenshots from a region you select on your screen, uses OCR (via Tesseract v5) to extract the characters, then feeds it to a machine translator (Google Translate) to then show you a translated text.

Since it works directly on images, there is no need to hack the game or anything to access the text. It is also cross-platform (support for Windows and Linux - experimental support for MacOSX).

This release features significant OCR detection and translation accuracy improvements, thanks to the changes described below.

Changes:
* add: Preprocessing filters and binarization to improve Tesseract OCR accuracy. The filters and steps are configurable from the config file, and the postprocessed image can be viewed if `Debug = True` to check the effect of various preprocessing filters.
* fix: windows are now always on top, instead of sometimes showing behind other windows.
* add: option to automatically remove line returns, this helps Google Translator get more context and hence provide better translations.

Known bugs:
* The app will stop registering hotkeys sometimes (silently if binaries are used, or with an error about Tkinter if launched from the Python interpreter). This is due to the fact that the app launches the TranslationBox in a thread, and Tkinter is not thread-safe. Please see issue 1 for more infos.

Keep in mind this is an alpha (and may forever stay in this state), but it is working (tested on Windows 10 x64 with Python 3.7 Anaconda).

0.4.5

pyugt is a pure-python universal game translator: it takes screenshots from a region you select on your screen, uses OCR (via Tesseract v5) to extract the characters, then feeds it to a machine translator (Google Translate) to then show you a translated text.

Since it works directly on images, there is no need to hack the game or anything to access the text. It is also cross-platform (support for Windows and Linux - experimental support for MacOSX).

Changes:

* Add `ocr_only` option in config.ini to allow to only capture on-screen text by OCR, without transmitting any data online to Google Translator.
* Documentation updates and fixes (such as MacOSX support - which in fact is there but experimentally).

Keep in mind this is an alpha (and may forever stay in this state), but it is working (tested on Windows 10 x64 with Python 3.7 Anaconda).

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.