Translate Lets Not See Each Other Again
In a hurry? Download link for the program is here. Edit config_template.txt for directions on setup, it'southward kind of catchy. Merely runs on Windows correct now. (Github source)
Why I wanted a "translate annihilation on the screen" button
I'm a retro gaming nut. I love consuming books, blogs, and podcasts nigh gaming history. The cherry on top is beingness able to experience the identical game, chip for bit, on original hardware. It's like fourth dimension traveling to the 80s.
Living in Nihon ways information technology's quite hard to get my hands on certain things (skillful luck finding a local Speccy or Apple tree IIe for sale) but easy and cheap to score retro Japanese games.
Yahoo Auction is kind of the ebay of Japan. There are great deals effectually if you know how to search for 'em. I get a boot out of going through erstwhile random games, I have boxes and boxes of them. It's a horrible hobby for someone living in a tiny flat.
There is one obvious trouble, however
Information technology'southward all in Japanese. Despite living here over xv years, my Japanese reading skills are not great. (don't judge me!) I messed effectually with using Google Translate on my phone to help out, only that's annoying and slow to endeavour to employ for games.
Why isn't there a Google Translate for the PC?!
I tried a couple utilities out at that place that might take worked for at least emulator content on the desktop, but they all had bug. Font issues, weak OCR, and zippo built to piece of work on an agnostic HDMI bespeak so I could do live translation while playing on existent game consoles.
So I wrote something to practice the task called UGT (Universal Game Translator) – you can download it near the lesser of this postal service if you want to endeavour it.
UGT 0.62 released – now includes a hotkey for elevate-rect selection and support for rendering Hindi https://t.co/0nIdLVmQ1B motion-picture show.twitter.com/6DdZfBAS87
— Seth A Robinson (@rtsoft) April 12, 2020
Here'south what information technology does:
- Snaps a film from the HDMI signal, sends it to google to be analyzed for text in whatever language
- Studies the layout and decides which text is dialog and which bits should be translated "line by line"
- Overlays the frozen frame and translations over the gameplay HDMI signal
- Allows re-create/pasting the original language or looking up a kanji by clicking on information technology
- Can translate whatsoever language to any language without needing any local data as Google is doing all the work, can handle rendering Japanese, Chinese, Korean, etc (The font I used is this one)
- Controlled by hotkeys (desktop mode) or a control pad (capture mode, this is where I'grand playing on a existent console but have a 2nd PC controller to control the translation stuff)
- (Added in afterwards versions) Tin read the dialog outloud in either the original or translated language
- Tin drag a rectangle to merely translate a small area (Ctrl-F10 by default)
In the video above, you'll notice some translated text is white and some is green. The green text ways it is being treated as "dialog" using its weighting organisation to decide what is/isn't dialog.
If a section isn't determined to be dialog, "Line past line" is used. For example, options on a menu shouldn't be translated all together (Run Attack Use Item), but piddling pieces separately like "Run", "Attack", "Use item" and overlaid exactly over the original positions. If translated as dialog, it would look and read very desperately.
Here are how my physical cables/boxes are setup for "camera mode". (Not required, desktop mode doesn't need any of this, but I'll talk about that afterward)
Happy with how merging ii video signals worked with a Roland V-02HD on the PlayStep project, I used a similar method hither also. I'm doing luma keying instead of blush as I can't really avoid light-green hither. I alter the captured image slightly then the luma is high enough to non be transparent in the overlay. (of course the non-modified version is sent to Google)
This setup uses the windows photographic camera interface to pull HDMI video (using Escapi past Jari Komppa) to create screenshots that it sends to Google. I'm using an Elgato Cam Link for the HDMI input.
Anyway, for 99.99999999% of people this is setup is overkill as they are probably merely using an emulator on the same estimator so I threw in a "desktop mode" that just lets yous use hotkeys (default is Ctrl-F12) to interpret the active Window. It's just like having Google Translate on your PC.
Hither'south desktop mode in activity, translating a JRPG being played on a PC Engine/TurboGrafx sixteen via emulation. It shows how you can copy/paste the recognized text if want equally well, useful for kanji study, or getting text read to you. You can click a kanji in the game to await it up too. (Update: It now internally can handle getting text read equally of V0.threescore, only click on the text. Shift-Click to alternate between the src/dest linguistic communication)
Endeavour it yourself
Before you download:
- All auto translation is HORRIBLE – this is no manner replaces the piece of work of real translators, it'southward just (slightly) better than nothing and tin can stop you from choosing "erase all data" instead of "keep game" or whatever
- You lot demand to rename config_template.txt to config.txt and edit it
- Specifically, yous demand to enter your Google Vision API key. This is a hassle simply it's how Google stops people from abusing their service
- Likewise, you'll need to enable the Translation API
- Google charges money for using their services after you hitting a certain limit. I've never actually had to pay annihilation, merely be conscientious.
- This is not polished software and should be considered experimental meant for computer savvy users
- Privacy warning: Every time y'all translate you're sending the image to google to analyze. This also could mean a lot of bandwidth is used, depending how many times you click the translate push. Ctrl-12 sends the active window only, Ctrl-11 translates your entire desktop.
- I got bad results with older consoles (NES, Sega Main System, SNES, Genesis), especially games that are but hiragana and no kanji. PC Engine, Saturn, Dreamcast, Neo-Geo, Playstation, etc worked better every bit they have sharper fonts with full kanji ordinarily.
- Some game fonts work meliorate than others
- The config.txt has a lot of options, each one is documented inside that file
- I'one thousand hopeful that the OCR and translations will improve on Google's stop over time, the prissy thing well-nigh this setup is the app doesn't need to exist updated to take advantage of those improvements or even additional languages that are later supported
Misc videos of features
Released Universal Game Translator V0.64 : at present by default the right joystick push button will trigger translations of the active window while nicely sharing the gamepad, don't take to bear on the keyboard at all. Here's me playing a PS1 game via Retroarch. https://t.co/0nIdLVEqT9 pic.twitter.com/dCoolo8AoP
— Seth A Robinson (@rtsoft) Dec 2, 2020
Added a "Push E to export to HTML" feature in UGT 0.65, helps me with Japanese study because now I tin apply the excellent chrome extension rikaichan/rikaikun on game dialog. Hither's a crappily made video using FFXIII (PS3) equally an instance motion-picture show.twitter.com/e4gMNcTMef
— Seth A Robinson (@rtsoft) February v, 2021
Latest changes
x/31/2021 – V0.72 Beta
This release is bugfixes and new features to support using UGT in tandem with other translation software that work with clipboard data.
- FEAT: Tin can now disable translations completely (useful if you lot only want the OCR features) – set up the active language to "00". Config text file has an example showing how to do it
- FEAT: Added "Invisible style (no overlay)" checkbox to the in-app options, if checked, UGT won't actually overlay anything over the game. (it will await like information technology's not doing anything, but as long every bit you've selected to put the text on the clipboard in the config.txt, this should piece of work for people who are using another app to view the pre or postal service translations)
- BUGFIX: Export to html handles line-by-line correctly
- When copying things to clipboard, no longer includes the extra whitespace or last CR. Hm, or did we want the last CR? Oh well, let's try this (jotumn)
- BUGFIX: Fixed freeze/crash that happened when Google processes text as upside-downwardly (Meerkov)
- Added deepl_api_url config.txt setting, allows yous to switch to the paid URL if needed. Previously it only would requite a wrong URL error if you lot used the paid version, oops. (RandomTemere)
- Pre-translated text blocks are now colored similar to postal service-translated text (ie, light-green for dialog), was kind of disruptive that they weren't before.
11/01/2021 – V0.73 Beta
- BUGFIX: UGT screen shouldn't be able to end up off the screen in an unusable position. Sometimes information technology takes two clicks to fix so it's still slightly sketch though (Cloudstrifeff7)
- At present adding spaces in "dialog" way text at a CR even when Google thinks it'southward a continuation of a word, Google seems to be incorrect a lot, so hopefully this is overall better. (no change for asian languages) (Cloudstrifeff7)
- BUGFIX: Alt-tabbing and opening UGT'due south main menu no longer causes it to forget the last custom rect browse area set (Cloudstrifeff7)
xi/07/2021 – V0.74 Beta
- BUGFIX: Fixed ugly bug with the hotkey system creating non-functional duplicates, not sure if it broke anything big but it tin can't be expert
- BUGFIX: Inverse timing so it doesn't sometimes crusade weird laggy behavior in Windows 11, probably helps with before versions too
- At present gives a prissy message if a hotkey can't be registered with instructions on why and how to ready it (Cloudstrifeff7)
(Older history moved hither, was getting outrageously long)
Download
NOTE FOR UPGRADING: It's recommended to kickoff with the config_template.txt again, just re-create over your google API central and rename information technology config.txt again.
Download Universal Game Translator for Windows (64-bit) (Codesigned by Robinson Technologies)
Get an error about DXINPUT_1.dll missing? Please install The Microsoft DirectX® End-User Runtime
This is an open up source project on Github
Decision and the future
Some possible upgrades:
- A built in Kanji lookup as well might be prissy, Jim Breen'south lexicon data could work for this.
- My first tests used Tesseract to do the OCR locally, simply without additional dataset preparation information technology appeared to non piece of work and then hot out of the box compared to results from Google'southward Deject Vision. (They utilise a modified Tesseract? Not sure) Information technology might be a nice option for those who desire to cut down on bandwidth usage or reliance on Google. Although the translations themselves would still exist an issue…
I like the idea of old untranslated games being playable in whatsoever language, in fact, I went looking for famous not-Japanese games that accept never had an English translation and actually had a hard fourth dimension finding whatsoever, especially on panel. If anyone knows of whatsoever I could test with, please let me know.
As well, even though my needs focus on Japanese->English, keep in mind this also works to interpret English (or 36 other languages that Google supports OCR with) to over 100 target languages.
Exam showing English being translated to many other languages in an awesome game called Growtopia
Source: https://www.codedojo.com/?p=2426
0 Response to "Translate Lets Not See Each Other Again"
Enregistrer un commentaire