Skip to content

bpwhelan/GameSentenceMiner

Repository files navigation

gamesentenceminer

GSM (GameSentenceMiner)

Turn your gaming time into language mastery.


🎮 See it in Action

Demo Gif

  • OCR to get get text from a game that doesn't support text hooks.
  • Look up words with Yomitan in game.
  • Create Anki cards with game audio + a gif automatically.

What does it do?

GSM is an application designed to automate the process of creating flashcards while you play. It sits between your game and Anki, handling audio recording, screenshots, and OCR so you don't have to interrupt your gameplay.

📝 Anki Card Enhancement

GSM automatically adds context to your Anki cards whenever you create them.

  • Audio Capture: Uses Voice Activity Detection (VAD) to record and trim the specific voice line associated with the text.
  • Screenshots: Captures the game state the moment the line is spoken. GIFs and Black Bar Removal are supported.
  • Mine from History: Go back and create cards from previous lines you've encountered (i.e. cutscenes).
  • Multi-Line Support: Capture multiple lines of dialogue into one card using the built-in Texthooker.
  • AI Translation: Optional integration to provide sentence translations using your own API key.
Sekiro.mp4

👁️ OCR (Text Recognition)

For games that don't have a text hook (Agent/Textractor), GSM uses a custom fork of OwOCR to read text directly from the screen.

This opens up all kinds of posssibilities for games that would otherwise be inaccessible for language learning/sentence mining. For example I've made cards with games like Metal Gear Solid 1+2, Titanfall 2, and Sekiro, all using GSM's OCR.

  • Easy Setup: Managed installation means you don't need to fiddle with terminals.
  • Two-Pass System: Clean, fast output similar to as if you had a hook.
  • Customizable Capture Zones: Define exactly where text appears on your screen for optimal results.
mgs_ocr.mp4

🖥️ Overlay

GSM includes a transparent overlay for instant dictionary lookups.

Currently Windows only, Linux and Mac support are WIP.

  • Hover over characters in-game to see definitions via Yomitan.
  • Create cards without ever leaving the game window.
  • Automatically Generated Furigana Display In Game.

Overlay Demo

📊 Statistics

Track your immersion habits with the stats dashboard.

  • Kanji Grid: View every Kanji you've encountered and click them to see their source sentences.
  • Goals: Set daily reading targets.
  • Database Management: Clean up and organize your mining history.

stats


🚀 Getting Started

  1. Download: Get the latest release.
  2. Install: Watch the Installation Guide.
  3. Requirements:
    • An Anki tool (Yomitan, JL, etc.)
    • A text source (Agent, Textractor, or GSM's built-in OCR)
    • A game

📚 Documentation

For full setup guides and configuration details, check the Wiki (Currently WIP).

❤️ Acknowledgements