Interpreter: A Fully Offline, RealâTime Japanese Text Translator for Retro Games
Interpreter is a lightweight, crossâplatform application that captures text from any retroâstyle game, performs OCR using a Japaneseâspecific engine, translates the text to English, and displays the results in a floating overlay. With no internet dependency and full privacy, itâs ideal for developers and enthusiasts who need onâdevice language support.
Interpreter is an openâsource, crossâplatform utility designed to translate Japanese text from classic video games on the fly. Built for Windows 10 (1903+), macOS, and Linux (X11, XWayland, Wayland), it requires no cloud services or online subscriptions, ensuring that all sensitive data stays on the userâs machine.
## Core Workflow
1. **Screen Capture** â The application captures the target window at a configurable refresh rate using OSânative APIs. On Linux it optionally relies on GStreamerâs PipeWire plugin to support native Wayland capture.
2. **OCR** â A customâtrained model called **MeikiOCR** extracts Japanese text pixelâbyâpixel, tuned to the lowâresolution fonts common in retro titles. The GUI exposes a confidence slider that balances recall against precision.
3. **Translation** â Extracted text is fed to the **Sugoi V4** engine, which performs JapaneseâtoâEnglish translation entirely offline. Initial launches trigger a ~1.5âŻGB model download; subsequent sessions reuse cached weights from the Hugging Face cache.
4. **Display** â Translated output is rendered in one of two overlay modes:
* **Banner** â a central subtitle bar at the bottom of the screen.
* **Inplace** â a transparent overlay that places translated characters directly over the original Japanese glyphs, maintaining clickâthrough support.
## Features
* **Offlineâfirst** â After the initial setup, the tool needs no internet connection, eliminating API costs and latency.
* **Privacyâcentric** â All text and translations remain local; no data leaves the host machine.
* **Free and openâsource** â Distributed under an MIT license, encouraging community contributions.
* **Optimized for retro games** â MeikiOCRâs training dataset focuses on pixel fonts and lowâresolution imagery, delivering higher accuracy than generic OCR solutions.
* **Translation caching** â A fuzzyâmatch cache prevents redundant translations for repeated or visually similar phrases.
* **Multiâdisplay support** â Overlays appear on the same monitor as the captured window, accommodating multiâmonitor setups.
## PlatformâSpecific Notes
- **Global hotkeys** on Linux require group membership that grants input capture. The installer prints guidance on adding your user to the necessary group.
- **Inplace overlay** on Wayland is limited to fullscreen windows due to the protocolâs security model, which prevents determining nonâfullscreen window positions.
## Installation
Interpretersâ installation scripts provide a singleâliner experience:
- **macOS / Linux**:
```
curl -LsSf https://raw.githubusercontent.com/bquenin/interpreter/main/install.sh | bash
```
- **Windows (PowerShell)**:
```powershell
powershell -c "irm https://raw.githubusercontent.com/bquenin/interpreter/main/install.ps1 | iex"
```
After installation, launch the GUI with the command `interpreter-v2`. To upgrade, reârun the same installation script.
## Using the Application
The GUI presents a straightforward workflow:
1. **Select window** â Choose the game window you wish to capture.
2. **Configure settings** â Adjust OCR confidence, overlay mode, and caching options.
3. **Start** â Press the start button to begin realâtime translation.
### Overlay Modes
- **Banner Mode** (default): A draggable, partially transparent subtitle bar displays translations at the screenâs bottom.
- **Inplace Mode**: Overlay is clickâthrough; translated text is rendered over the original Japanese string, preserving the gameâs visual context.
## Troubleshooting
- **Low OCR accuracy** â Tweak the confidence slider. Lower values allow more detections (but may introduce noise), higher values restrict to higherâconfidence text.
- **Initial performance lag** â The first launch must download language models; subsequent runs are faster as models are cached under `~/.cache/huggingface/`.
## Conclusion
Interpreter demonstrates that sophisticated, realâtime language translation can be achieved entirely offline, even on resourceâconstrained machines. By combining a gameâspecific OCR model with an efficient translation engine, it offers developers a robust, privacyâsafe tool to localize retro gaming experiences without external dependencies.