Skip to content

Latest commit

ย 

History

37 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒธ Visual Novel Translator

A next-generation desktop application for translating untranslated Visual Novels in real-time with transparent subtitles, zero-latency script knowledge base, and dynamic AI reasoning models.

Tauri v2 React 19 TypeScript Rust License: GPL v3


โฌ‡๏ธ Download Latest Release โ€ข ๐Ÿ“– Quickstart Guide โ€ข ๐Ÿ’ก Best Practice Workflow โ€ข โŒจ๏ธ Hotkeys


Note

Active Development: Visual Novel Translator is under active development. New features, UI polish, and performance optimizations are continuously added. Feedback, suggestions, and issue reports are warmly welcomed!


๐Ÿ’ก What is Visual Novel Translator?

Visual Novel Translator allows you to read untranslated Japanese Visual Novels smoothly without modifying game archives or binary files.

Unlike traditional romhacking or script repacking tools (which require unpacking archive files, manipulating script bytecodes, and repacking everything), this application operates alongside your running game:

  1. Live Game Capture: Reads dialogue in real-time as you play via Textractor Memory Hooking (32-bit & 64-bit) or High-Speed Screen OCR (Windows 10 & 11).
  2. Transparent HUD Overlay: Displays smooth, customizable subtitles directly over your visual novel with click-through support.
  3. Instant Script Knowledge Base: Matches lines against pre-loaded script files in $< 0.1\text{ms}$ with zero network latency and perfect story consistency.
  4. State-of-the-Art AI Translation: Leverages advanced LLMs and reasoning models (DeepSeek R1, OpenAI o1/o3, Claude 3.7 Sonnet, Gemini Flash) with custom style presets and multi-turn context memory.

๐ŸŒŸ Key Capabilities

1. ๐ŸชŸ Transparent Subtitle Overlay (In-Game HUD)

  • Click-Through Mode (Ctrl + Shift + L): Seamlessly pass mouse clicks directly to the underlying game without interrupting choices or menu navigation.
  • Interactive Move & Resize: Toggle interactive mode to position, resize, and fine-tune your subtitle HUD with a visual drag handle.
  • Built-in Aesthetic Presets: Choose from curated themes (Visual Novel Classic, Glassmorphism, Cyberpunk, Cinematic Widescreen, RPG Dialogue Box) or create custom designs.
  • Full Customization & Custom CSS: Adjust fonts, outline thickness, text shadows, background blur, and inject custom CSS styles.

2. ๐ŸŽฎ Multi-Source Game Capture

  • Textractor Memory Hook (32-bit & 64-bit): Hooks directly into the visual novel process memory for instant, artifact-free text extraction.
    • Supports combined speaker/dialogue streams (e.g. ใ€ๆ™บไปฃใ€‘ใ€ŒใŠใฏใ‚ˆใ†ใ€).
    • Supports separate thread pairing (capturing character name thread as ๐Ÿ‘ค Speaker and text thread as ๐Ÿ’ฌ Dialogue with automatic synchronization).
  • Native Windows OCR (Windows 10 & 11): High-speed screen OCR for non-hookable titles (browser games, emulators, engines with anti-hook protection).
    • Dual region selection for dialogue box and speaker nameplate.
    • Auto-scan timer or manual capture via hotkey (F9).

3. ๐Ÿง  Dynamic Model-Specific Reasoning & Thinking Tokens

  • Adaptive OpenRouter Reasoning Engine: Automatically inspects model metadata to detect reasoning capabilities (Supported Efforts, Mandatory Reasoning, Token Budgeting, or Binary Toggle).
  • Nested Hover Submenu Selector: Select model and effort level in 1 click via an intuitive flyout submenu (Default, Off, Minimal, Low, Medium, High, Max).
  • Per-Model Preferred Effort Persistence: Remembers your preferred thinking effort individually for each model (e.g., Low for o3-mini, Medium for Gemini Flash Thinking, Max for o3-max).

4. ๐ŸŽญ Translation Style & Tone Presets + Real-Time Preview

  • Curated Tone Presets:
    • Standard Visual Novel: Natural flow balancing character nuance and readability.
    • Light Novel & Expressive: Vivid emotional delivery and character vocal quirks.
    • Erudite & Historical: Classic literature tone for period pieces and heavy lore.
    • Casual & Modern Slang: Conversational tone with contemporary natural dialogue.
    • Literal & Nuanced: Precise fidelity preserving original Japanese sentence structures.
  • Custom User Presets & Variable Engine: Create and save your own translation system prompts with dynamic variable interpolation ({{TARGET_LANG}}, {{STYLE_INSTRUCTIONS}}, {{GLOSSARY}}).
  • Live Interactive Preview: Test system prompts against mock dialogue lines in real-time before playing.

5. ๐Ÿ“š Zero-Latency Script Knowledge Base & Auto-Learning

  • Sub-Millisecond In-Memory Lookup ($< 0.1\text{ms}$): Pre-load translated script files (.json, .jsonl, .txt, .csv) into memory. Matching dialogue lines appear instantly on the overlay without making online API requests.
  • Multi-Tier Fuzzy & Canonical Matching: Compensates for line wraps, punctuation differences, and character prologue aliases (e.g. matching prologue alias ใ€Œใ‚ฏใƒฉใ‚นใƒกใ‚คใƒˆใ€ with character name ใ€Œ็ซ ๅพใ€).
  • Auto-Learning Stream: Translations processed during your gameplay session can be automatically learned and saved to your local database for future playthroughs.

6. โšก High-Throughput Batch Script Translator

  • Pre-Translate Entire Games: Translate extracted script files in bulk before playing.
  • Concurrency & Resilient Retries: Multi-worker concurrent processing, automatic rate-limit backoff, and live token usage metrics.
  • Auto-Save & Resume: Periodic checkpointing ensures long translation jobs never lose progress on unexpected interruptions.

7. ๐Ÿ“– Character Glossary & 1-Click VNDB Scraper

  • Terminology Consistency: Enforce strict character names, gender references, and route-specific terms across your entire playthrough.
  • 1-Click VNDB Import: Enter any VNDB Visual Novel ID (e.g. v17 for Steins;Gate, v4 for Fate/stay night) to instantly import official character names, aliases, and gender tags into your glossary.

8. ๐Ÿ› ๏ธ Custom Text Replacement & Preprocessing Pipeline

  • Furigana & Ruby Annotation Stripper: Automatically cleans pronunciation readings like ็ง(ใ‚ใŸใ—), ๆผขๅญ—[ใ‹ใ‚“ใ˜], and <ruby> tags so the translator receives clean raw text.
  • Engine Formatting & Control Code Cleaner: Removes game engine formatting tags (e.g. \c[2], \v[1], color/font codes), escape sequences, and null bytes.
  • Unicode NFKC & Japanese Punctuation Normalization: Standardizes half-width katakana, full-width characters, ellipses (โ€ฆโ€ฆ โ†’ โ€ฆ), quotes, and strips decorative noise symbols (โ™ช, โ™ฅ, โ˜…).
  • Custom Regex & Plain-Text Rules: Create custom replacement rules with source-specific targeting (Textractor, OCR, Batch, Manual) and test them live in the built-in interactive sandbox.

9. ๐ŸŒ Flexible Translation Providers

  • Free Zero-Cost Translation: Instant out-of-the-box translation using Google Translate Web Stream and DeepL Free scraper (no API keys required).
  • OpenRouter AI Gateway: Connect your OpenRouter API key to access 200+ state-of-the-art models with custom provider routing.

๐Ÿš€ How to Use

๐ŸŽฎ Method A: Playing with Game Memory Hook (Recommended)

  1. Launch your Visual Novel game.
  2. Open Visual Novel Translator and navigate to ๐ŸŽฎ Textractor Input in the sidebar.
  3. Click Refresh Process List, choose your visual novel process, and click Attach Process.
  4. Advance dialogue in your game to populate the Detected Threads list:
    • If the thread contains both speaker and dialogue (e.g. ใ€้ฅๆœˆใ€‘ใ€ŒใŠใฏใ‚ˆใ†ใ€), set role to โœจ Combined.
    • If speaker and dialogue appear on separate threads, assign one to ๐Ÿ‘ค Speaker and the other to ๐Ÿ’ฌ Dialogue.
  5. Enable the In-Game Overlay (press Ctrl + Shift + L to reposition or resize).
  6. Read smoothly! Subtitles update in real-time as you advance in-game dialogue.

๐Ÿ“ท Method B: Playing with Screen OCR

  1. Launch your game.
  2. Navigate to ๐Ÿ“ท OCR Input in the sidebar.
  3. Click Select Dialogue Region and drag a bounding box over the game's text area.
  4. (Optional) Click Select Speaker Region if character names appear in a separate nameplate box.
  5. Set scan mode to Auto-Scan (Timer) or press F9 for instant manual capture.
  6. Open the In-Game Overlay and enjoy.

๐Ÿ’ก Recommended Workflow: The "Zero-Latency" Advantage

For the ultimate reading experience with zero translation delay and maximum AI quality:

  1. Extract game script files to .txt, .json, or .jsonl using extraction tools for your game engine.
  2. Open โšก Batch Translate to translate the script files using an AI model of your choice.
  3. Open ๐Ÿ“š Script Database, click Import Scripts, and add your translated files into the database.
  4. Launch your game and play with Textractor Hook:
    • Every line of dialogue instantly matches your local database ($&lt; 0.1\text{ms}$) with zero API cost and no network lag.
    • Any unscripted lines gracefully fall back to live AI / MT translation.

โŒจ๏ธ Global Hotkeys

Shortcut Action
Ctrl + Shift + L Toggle Overlay Click-Through / Interactive Move & Resize Mode
Ctrl + Shift + P Pause / Resume Live Translation Stream
F9 Trigger Instant Manual OCR Scan

(Hotkeys can be customized under Settings โ†’ General Settings)


๐Ÿ› ๏ธ Build from Source (For Developers)

Click to expand developer build instructions

Prerequisites

  • Node.js (v18.0 or newer)
  • Rust & Cargo (v1.75 or newer)
  • C++ Build Tools (Visual Studio Desktop Development with C++)

Local Setup & Compilation

  1. Clone the repository:

    git clone https://github.com/acvirya/visual-novel-translator.git
    cd visual-novel-translator
  2. Install dependencies:

    npm install
  3. Run in development mode:

    npm run tauri dev
  4. Run automated test harness:

    npx vitest run
  5. Build production bundle (.exe / .msi):

    npm run tauri build

๐Ÿ“„ License

Distributed under the GNU General Public License v3.0 (GPL-3.0). See LICENSE for full details.

Copyright ยฉ 2026 Anggatha Chandra Virya. All rights reserved.

About

Real-time Visual Novel translator with transparent subtitle overlay, Textractor hooking, screen OCR, and batch script processing.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages