Offline screen translator for Japanese retro games
Project description
Interpreter
Offline screen translator for Japanese retro games. Captures text from any window, performs OCR, translates to English, and displays subtitles in a floating overlay.
Features
- Fully offline - No cloud APIs, no internet required after setup
- Free - No API costs or subscriptions
- Private - Text never leaves your machine
- Optimized for retro games - Uses MeikiOCR, trained specifically on Japanese game text
- Two overlay modes - Banner (subtitle bar) or inplace (text over game)
- Translation caching - Fuzzy matching avoids re-translating similar text
Requirements
- Python 3.11+
- macOS (Windows/Linux support planned)
Installation
-
Install uv (modern Python package manager):
curl -LsSf https://astral.sh/uv/install.sh | sh
-
Clone and install:
git clone https://github.com/bquenin/interpreter.git cd interpreter uv sync
-
Models are downloaded automatically on first run (~1.5GB total).
Usage
# List available windows
uv run interpreter --list-windows
# Run with default config
uv run interpreter
# Run with specific window
uv run interpreter --window "Tales"
# Start in inplace mode (text over game)
uv run interpreter --overlay-mode inplace
# Debug mode (show OCR confidence scores)
uv run interpreter --debug
Controls
| Key | Action |
|---|---|
m |
Cycle overlay mode: off → banner → inplace |
- |
Decrease font size |
= |
Increase font size |
Ctrl+C |
Quit |
In banner mode, you can drag the overlay to reposition it.
Overlay Modes
Banner Mode (default)
A subtitle bar at the bottom of the screen displaying translated text. Draggable, opaque background, centered text.
Inplace Mode
Transparent overlay positioned over the game window. Translated text appears directly over the original Japanese text at OCR-detected positions. Click-through so you can interact with the game.
Configuration
Edit config.yml:
# Window to capture (partial title match)
window_title: "Tales"
# Refresh rate in seconds
refresh_rate: 0.5
# OCR confidence threshold (0.0-1.0)
# Filters out garbage text by average per-line confidence
ocr_confidence: 0.6
# Subtitle appearance
font_size: 24
font_color: "#FFFFFF"
background_color: "#404040"
How It Works
- Screen Capture - Captures the target window at the configured refresh rate
- OCR - MeikiOCR extracts Japanese text (optimized for pixel fonts)
- Translation - Sugoi V4 translates Japanese to English
- Display - Shows translated text in the selected overlay mode
Troubleshooting
Window not found
Use --list-windows to see available windows. The window title is a partial match.
Poor OCR accuracy
Try adjusting ocr_confidence in config. Lower values include more text (but may include garbage), higher values are stricter.
Slow performance
First run downloads models (~1.5GB). Subsequent runs use cached models from ~/.cache/huggingface/.
What's New in v2
- Inplace overlay mode - Text appears directly over game text
- Mode cycling - Press
mto switch between off/banner/inplace - Font size adjustment - Press
-/=to resize on the fly - Translation caching - Fuzzy matching reduces redundant translations
- Improved OCR - Punctuation excluded from confidence calculation
- Better window capture - Excludes overlapping windows, auto-detects fullscreen
- Multi-display support - Overlay appears on the same display as the game
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file interpreter_v2-2.0.1.tar.gz.
File metadata
- Download URL: interpreter_v2-2.0.1.tar.gz
- Upload date:
- Size: 3.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9f4df174a3fa6313015f290849d2140794a0ef08ac66b2bbe42217d9b88db21
|
|
| MD5 |
f33d4129f874fcd1d697ef2fb72b2470
|
|
| BLAKE2b-256 |
dd47c346df7a86a0239b984d1be1bc30a970746ce45568e2570a401732fb6ce8
|
File details
Details for the file interpreter_v2-2.0.1-py3-none-any.whl.
File metadata
- Download URL: interpreter_v2-2.0.1-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ddb7598a9d46b61dccf002ef09b92c71f7af36986fd542816ed42336f0b4301
|
|
| MD5 |
e26f26348722d4b1048a741515d49beb
|
|
| BLAKE2b-256 |
b4fbcf9c025c19c271f76cfddeb5dae00ba54595e489aa56f4a9610e90a2700e
|