GithubHelp home page GithubHelp logo

danily07 / translumo Goto Github PK

View Code? Open in Web Editor NEW
2.8K 39.0 118.0 102.32 MB

Advanced real-time screen translator for games, hardcoded subtitles in videos, static text and etc.

License: Apache License 2.0

Batchfile 0.16% C# 99.84%
easyocr game-translation mlnet ocr translation autotranslate

translumo's Introduction

License Github All Releases

EN | RU

Advanced screen translator. Translumo is able to detect and translate appearing in the selected area text in real-time (e.g. subtitles).

Main features

  • High text recognition precision
  • Translumo allows to combine the usage of several OCR engines simultaneously. It uses machine learning training model for scoring each recognized result by OCR and chooses the best one.

  • Simple interface
  • The main idea was to make tool, that does not require manual adjustments for each case and convenient for everyday use.
  • Low latency
  • There are several implemented optimizations to reduce impact on system performance and minimize latency between the moment a text appears and actual translation.
  • Integrated modern OCR engines: Tesseract 5.2, WindowsOCR, EasyOCR
  • Available translators: Google Translate, Yandex translate, Naver Papago, DeepL
  • Available recognition languages: English, Russian, Japanese, Chinese (simplified), Korean
  • Available translation languages: English, Russian, Japanese, Chinese (simplified), Korean, French, Spanish, German, Portuguese, Italian, Vietnamese, Thai, Turkish, Arabic

System requirements

  • Windows 10 build 19041 (20H1) / Windows 11
  • DirectX11
  • 8 GB RAM (for mode with EasyOCR)
  • 5 GB free storage space (for mode with EasyOCR)
  • Nvidia GPU with CUDA SDK 11.8 support (GTX 750, 8xxM, 9xx series or later) (for mode with EasyOCR)

How to use

  1. Open the Settings
  2. Select Languages->Source language and Languages->Translation language
  3. Select Text recognition->Engines (please check Usage tips for recommendation modes)
  4. Select capture area
  5. Run translation

Usage tips

Generally, I recommend always keep Windows OCR turned on. This is the most effective OCR for the primary text detection with less impact on performance.

Recommended combinations of OCR engines

  • Tesseract-Windows OCR-EasyOCR - advanced mode with the highest precision
  • Tesseract-Windows OCR - noticeably less impact on system performance. It will be enough for cases when text has simple solid background and font is quite common
  • Windows OCR-EasyOCR - for very specific complex cases it makes sense to disable Tesseract and avoid unnecessary text noises

Select minimum capture area

It reduces chances of getting into the area random letters from background. Also the larger frame will take longer to process.

Use proxy list to avoid blocking by translation services

Some translators sometimes block client for a large number of requests. You can configure personal/shared IPv4 proxies (1-2 should be enough) on Languages->Proxy tab. The application will alternately use proxies for requests to reduce number from one IP address.

Use Borderless/Windowed modes in games (not Fullscreen)

It is necessary to display the translation window overlay correctly.

If the game doesn't have such mode, you can use external tools to make it borderless (e.g. Borderless Gaming)

Install the application on SSD

To reduce cold launch time with enabled EasyOCR engine (loading large EasyOCR model into RAM).

FAQ

I got error "Failed to capture screen" or nothing happens after translation starts

Make sure that target window with text is active. Also try to restart Translumo or reopen target window.

I got error "Text translation is failed" after successful using the translation

There is a high probability that translation service temporarily blocked requests from your IP. You can change translator or configure proxy list.

Can't enable Windows OCR

Make sure that the application is runned as an Administrator. Translumo each time tries check installed Windows language pack via PowerShell.

I set borderless/windowed mode, but a translation window is still displayed under a game

When game is running and focused use the hotkey (ALT+T by default) to hide and then show again translation window

Package downloading for EasyOCR failed

Try to re-install it under VPN

Hotkeys don't work

Other applications may intercept specific hotkeys handling

I got error "Text detection is failed (TesseractOCREngine)"

Make sure that the application path contains only latin letters.

Build

Visual Studio 2022 and .NET 7 SDK are required

  • Clone repository (master branch always equals last release version):
  • git clone https://github.com/Danily07/Translumo.git
  • Restore packages and build a solution. binaries_extract.bat will be executed during building, which will automatically download models and python binaries to target output directory.

Credits

translumo's People

Contributors

danily07 avatar eltociear avatar igubanov avatar ivang7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

translumo's Issues

Убрать фон (100% прозрачность)

Хотелось бы иметь возможность выставить прозрачность фона (цвет окна) на 100%, чтобы его не было вообще, чтобы был только текст )

Proxy list import

Apparently, at the moment we have to enter them manually.
Any plans to implement a list import?

Though it's been said that 1-2 should be enough, the input form is poorly made and doesn't allow copypaste.

The term 'Get-WindowsCapability' is not recognized as a name of a cmdlet

При включении второй модели (Windows OCR) вылезает ошибка, в логах следующее:

[ERR] Checking language pack error
Translumo.Infrastructure.Exceptions.OptionalFeatureAccessException: Failed to get PS object
 ---> System.Management.Automation.CommandNotFoundException: The term 'Get-WindowsCapability' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
   at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandTypes commandTypes, SearchResolutionOptions searchResolutionOptions, CommandOrigin commandOrigin, ExecutionContext context)
   at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandOrigin commandOrigin, ExecutionContext context)
   at System.Management.Automation.CommandDiscovery.LookupCommandInfo(String commandName, CommandOrigin commandOrigin)
   at System.Management.Automation.CommandDiscovery.LookupCommandProcessor(String commandName, CommandOrigin commandOrigin, Nullable`1 useLocalScope)
   at System.Management.Automation.ExecutionContext.CreateCommand(String command, Boolean dotSource)
   at System.Management.Automation.PipelineOps.AddCommand(PipelineProcessor pipe, CommandParameterInternal[] commandElements, CommandBaseAst commandBaseAst, CommandRedirection[] redirections, ExecutionContext context)
   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
   --- End of inner exception stack trace ---
   at Translumo.Infrastructure.Powershell.OptionalFeaturesProvider.GetPsObjectOcrLanguagePack(String languageCode)
   at Translumo.Infrastructure.Powershell.OptionalFeaturesProvider.OcrLanguagePackIsInstalled(String languageCode)
   at Translumo.Dialog.Stages.ConditionalInteractionStage.ExecuteInner()
   at Translumo.Dialog.Stages.InteractionStage.ExecuteAsync()

И, вроде бы, понятно, что не распознается команда Get-WindowsCapability из dism, но как исправить - идей нет.

Курсор мыши мешает при переводе

Добрый день!

Столкнулся с интересным моментом: Translumo "видит" курсор мыши и это мешает ему, когда курсор находится над текстом во время перевода.

Сделайте, пожалуйста, так, чтобы курсор мыши игнорировался и не был "виден" для Translumo.

text translation is failed

Доброе утро.
При переводе Старфилда оч часто вылезает вот эта ошибка.
Выделяю зону корректно, но почему то не переводит.
Использую DeepL с прокси. Без прокси тоже самое.
Пробовал яндекс и папаго, но он отсебятину пишет лютую. как быть?
Screenshot_1

Fixing the window

I would like to ask you to please add a button to "fix the window" instead of moving it with the mouse. This would be useful when playing action or other games, where the mouse is running across the screen and in case of what you can accidentally hit this window.

Возможность задать область отображения переведенного текста.

Хотелось бы иметь возможность ограничить область экрана в которой отображается переведенный текст, аналогично тому как происходит выбор области захвата исходного текста. В нынешней реализации текст планомерно заполняет весь экран(не знаю баг это или фича), что очень неудобно.

Не запускается

Версия программы 0.8.0
Windows 10 Pro 22H2 19045.3086
Пробовал запускать через права администратора.
Снимал с папки атрибут "только для чтения"
Пробовал в разных режимах совместимости.
Архив с логами прилагаю
Logs.zip
DxDiag.txt

Текст слишком долго остается на экране

Предлагаю добавить в настройки опцию "fade out" с настройкой времени ожидания и затухания.
В моменты когда нет текста на экране, окно перевода висит с текстом и отвлекает.
image

Ошибка установки пакета ailed to install language pack

Выбираю исходный язык, японский, корейский, китайский:

  • языковой пакет не установлен, хотите установить сейчас?
  • ок
  • установка языкового пакета
  • Ошибка установки пакета ailed to install language pack

Вообщем только английский могу выбрать, с английского переводить на другие языки, а вот азиатские языки не устанавливаются почему то... (у друга норм работает)

Вот что в логах было:
22:23:48.384 [ERR] Language windows pack install error
Translumo.Infrastructure.Exceptions.OptionalFeatureAccessException: Failed to install language pack
---> System.Runtime.InteropServices.COMException (0x800F0950): Сбой Add-WindowsCapability. Код ошибки: 0x800f0950
at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)
--- End of inner exception stack trace ---
at Translumo.Infrastructure.Powershell.OptionalFeaturesProvider.OcrLanguagePackInstall(String languageCode)
at Translumo.Dialog.Stages.StagesFactory.<>c__DisplayClass2_0.<b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Translumo.Dialog.Stages.ConditionalInteractionStage.ExecuteInner()
at Translumo.Dialog.Stages.InteractionStage.ExecuteAsync()

EasyOCR не устанавливается

Не работает ни в обычном режиме с правами администратора, ни под впном. Пытается долгое время установить pytorch, затем закрывается с ошибкой a task was canceled(под впном) и длинным кодом ошибки без впна. Также попробовал самостоятельно поставить недостающие модули - программа их не видит и пытается установить их самостоятельно

Исходный язык

Добавьте больше популярных языков в качестве исходного языка или возможность их добавления вручную. Например немецкий.

Image preprocessing

Hi. Thanks for the project!

A few years ago I developed an in-house ad-hoc OCR solution based on Tesseract. And want to share some suggestions. As you probably already know, Tesseract has very weak preprocessing phase (not-so-advanced binarization techniques, trash removal, etc.). To help with it, I developed a library with pre-recognition algorithms: https://github.com/zamazan4ik/PRLib Maybe you would be able to find something useful there.

Добавление языка

Здравствуйте. Не могли бы вы добавить тайский или предоставить пользователю самому добавлять язык? Спасибо

Translate result and some feedback

Hi @Danily07,

The source text that has been OCR doesn't appear on the translation screen. It would be better if it did. You can make this the default or add it as an option. The results can't be copied from the translation screen. The source text should be automatically copied to the clipboard. In this way, we can also use it in other translation apps. It would be good to add the languages added as translation languages as source languages as well.

Thanks.

Перестал переводить

Все работало хорошо, но как дипл заблокировал и поставил прокси, почему-то перестало переводить в режиме реального времени, приходиться заново захватывать экран что бы перевел строку, хотя до этого все было хорошо. Из-за чего такая проблема может быть и как мне ее решить, помогите пожалуйста.

Madworld

image

в MadWorld'e переводит бывает вот так, это можно пофиксить?

One shot translation and translation history

Hi again :D

Translation doesn't always need to be consecutive. Can you provide support for snapshot translation? Automatic translation will be performed when an area is selected. You can add new shortcut for this. In addition, translation histories should be saved. You can add an option to the menu for this.

Thanks.

Не сохраняется прокси

Салют.
купил прокси, ввожу в Транслумо все корректно - нажимаю применить и ничего не происходит.
нажимаю "настроить прокси" заново и там нет моих сохраненных прокси.
как решить?

This repository is over its data quota

Привет!

При клонировании получаю ошибку

git-lfs/3.3.0 (GitHub; windows amd64; go 1.19.3; git 77deabdf)
git version 2.41.0.windows.1

$ git-lfs.exe filter-process
Error downloading object: etc/Models/easyocr.zip (58c5d37): Smudge error: Error downloading etc/Models/easyocr.zip (58c5d3770eaea2792ed976427c904891656e803e74983e013259f2102bb69ce5): batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.

This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
batch response

прога перестает переводить

Распознавание текста в какой-то момент останавливается, и не выдает перевод из области захвата.
То есть, если это диалог, то захват может пропустить реплику. Но при этом, если скипнуть эту реплику, то прога переводит спокойно следующую реплику. То есть программа не выдает критическую ошибку, а просто игнорирует иногда реплики.
Причем если перезапустить "перевод" через "`", то он тут же захватит реплику и переведет.

Проблема не большая, нужно просто клацать тильду иногда. Но если это можно исправить, то было бы вообще шикарно.

ps. тестировал в Якудзе.

Text detection is failed (TesseractOCREngine)

В расположении приложения нет кириллицы, но выдается эта ошибка в независимости от комбинаций OCR.

Proxy connection check button

Hi! Thank you for the brilliant app! I wanted to ask if it is possible to add a button to check the connection to make sure that the data I entered is correct and the proxy really works? Because I don't understand now whether my addresses work or not.

Больше зон перевода

Было бы здорово, если бы была возможность выделить одновременно несколько зон под перевод и включать/выключать перевод в них отдельно + для каждой зоны навесить горячую клавишу или сочетание клавиш для одноразового перевода, а не постоянного мониторинга.
К сожалению снес игру, где мне это было надо, так как сама игра не понравилась, но нарисую в пэйнте чтобы было понятнее что я подразумеваю.
Перевод каждой зоны можно выводить в окне перевода просто разными цветами (или дать возможность разнести их по разным включаемым/отключаемым окошкам, а лучше и то и другое, кому как удобно).
Плюс хорошо бы тогда сохранять профили для разных игр, чтобы восстанавливать все эти зоны в один клик подгрузив настройки, а не рисовать их каждый раз заново (кстати по возможности неплохо бы отслеживать не свернуто ли приложение и находится ли в фокусе, а если оно не обнаружено, то перевод ставить на паузу, опять таки в этом же профиле сохранять привязку к приложению хотя бы банально по названию процесса).
изображение_2023-07-26_212407889

Поддержка Linux

Привет, автор данного великолепного творения. Есть шансы на появление сборки под Linux-дистрибутивы? Или там все завязано на Windows библиотеки?

~ hotkey kills Ё

Yeah, hotkeys configuration is a planned feature, but is there something that can be done to remedy this (w/o building the whole thing from the source)?

капча

открывается окно с капчей но оно пустое

Прокси не добавляется

Почему нет возможности добавить бесплатные прокси?(Без логина и пароля)
Они просто исчезают, хотя работают исправно везде кроме этой проги, почему-то просто не сохраняются

Google Translate

I love this project, everything works well and it's well developed. However the google translate option only returns Russian translation for me, and I don't know why. Is it only with me or it's a bug for everyone?

WinOCR и запуск не от Администратора

Описание проблемы: запускаю программу от Администратора, OCR-движок WinOCR в настройках включён. Запускаю от обычного пользователя - WinOCR в настройках выключен, при попытке включить требует повышения уровня до Администратора. При этом все нужные пакеты уже скачены и из-под Администратора всё работает. Но галку в настройках из-под обычного пользователя не поставить.

Я ставил программу кажется ещё со второго релиза, а дальше только исполняемый файл обновлял. Возможно при установке с нуля это уже не так, но у меня так. А хотелось бы не от Администратора запускать программу.

Проблема

Desktop Screenshot 2023 06 18 - 16 31 21 08
я не знаю почему оно так работает, но довольно смешные наборы символов. В любом случае я хз как это исправить

Windows OCR error

При попытке включить Windows OCR, просит скачать языковой пакет. я соглашаюсь- но по итогу ошибка скачивания пакета. В чем может быть причина? Программа запущена от админа, в пути кириллицы нет.

не реалтайм режим

просьба добавить такой режим когда не ведётся постоянного мониторинга, а при необходимости по хоткею выделяется требуемая область и осуществляется её перевод с опцией копирования в буфер, а потом по крестику всё закрывается до следующего раза

Issue Running Application in Windows 11 VM

Hello,

I've encountered an issue when trying to run the application on a Parallels Windows 11 virtual machine (ARM architecture).

The application throws a System.DllNotFoundException for the "leptonica-1.82.0.dll" library when attempting to perform text detection via the Tesseract OCR engine.

I'm not sure if this is a compatibility issue with the ARM architecture or something else. I'd appreciate any guidance on how to troubleshoot and resolve this problem.

log20230707.txt

Font Appearance page crashes the app (ASUS GPU Tweak III OSD conflict)

I can't change text appearance.

Did it once, then realized it was a poor choice.
Now it crashes upon every try to change the font color.

Recorded in 0.8, but 0.8.5 has the same issue (got only the update).
Can't attach any logs, since the app haven't produced any.
Launching "as admin" doesn't help.

If there's a way to get more info out of the app - plz do tell me how.

vokoscreenNG-2023-06-19_15-40-36.mp4

Капча яндекс переводчика пропадает

Часто пользуюсь именно им и возникла такая проблема, что при переводе всплывает окно с просьбой пройти капчу для дальнейшего перевода, но проблема в том, что оно сразу же закрывается и в итоге пройти капчу нереально, что приводит к невозможности использования данного метода перевода. Конечно, я могу перейти на гугл, но вдруг и там попросят капчу и будет тоже самое, в общем, неприятный баг.

Добавьте, пожалуйста, задержку распознавания текста

Добавьте, пожалуйста, задержку распознавания текста. Возможно, настраиваемую.

Так получается, что это приложение очень полезно для визуальных новелл и игр с элементами визуальных новелл. А там текст именно появляется постепенно.

Было бы очень здорово установить задержку хотя бы на 3-4 секунды, чтобы переводчик не пытался переводить слова находу сразу же.

Да, я видел, что в ReadMe Вы рекомендовали настраивать одномоментное появление всего текста, но далеко не все игры имеют такую настройку.

Игры на RenPy

Игры на Ренпае могут переводиться только в оконном режиме, потому что окно перевода при активации окна игры (когда оно в фокусе) скрывается. Это неправильно. Функция SetForegroundWindow может быть могла бы помочь. Или опция "принудительный вывод окна перевода впереди всех после каждого нового перевода".

Выбор цвета текста интересный, но чисто белый цвет я установить не смог. Только светло-синий. Нужна более человеческая палитра, может быть простое перечисление - белый, красный, чёрный... Как вариант.

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.