# ramjke/translumo architecture

> Architecture diagram of the GitHub repository ramjke/translumo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ramjke/translumo
- Repository: https://github.com/ramjke/translumo

## Overview

Translumo is a Windows real-time screen translator. The principal workflow is: a user invokes a hotkey, selects or uses a capture region, OCR engines recognize screen text, machine-learning validation selects the best result, a configured translator produces the target language, and the chat overlay displays it. The tree also shows multiple OCR and translation providers, optional speech output, encrypted settings, and gamepad input. Some orchestration links are inferred from documented behavior and naming; sampled source directly confirms OCR creation, Python integration, and hotkey dispatch.

Main entry points: [`src/Translumo.Translation/TranslatorFactory.cs`](https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/TranslatorFactory.cs) (Translator Factory), [`src/Translumo.Processing/TranslationProcessingService.cs`](https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TranslationProcessingService.cs) (Translation Processing), [`src/Translumo.Processing/TextProcessing/TextDetectionProvider.cs`](https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TextProcessing/TextDetectionProvider.cs) (Text Detection), [`src/Translumo.OCR/OcrEnginesFactory.cs`](https://github.com/ramjke/translumo/blob/master/src/Translumo.OCR/OcrEnginesFactory.cs) (OCR Factory)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input["Input &amp; Capture"]
  node_hotkeys["Hotkey Manager"]
  node_selection["Selection Window"]
  node_capture["Screen Capturer"]
  node_processing["Translation Processing"]
end

subgraph group_recognition["Text Recognition"]
  node_detection["Text Detection"]
  node_ocr_factory["OCR Factory"]
  node_windows_ocr["Windows OCR"]
  node_tesseract["Tesseract OCR"]
  node_easyocr["EasyOCR<br/>[EasyOCREngine.cs]"]
  node_python["Python Runtime"]
  node_validity["Text Validity Model"]
  node_text_cache["Text Result Cache"]
end

subgraph group_translation["Translation"]
  node_translator_factory["Translator Factory"]
  node_deepl["DeepL Translator<br/>[DeeplTranslator.cs]"]
  node_google["Google Translator"]
  node_yandex["Yandex Translator"]
  node_papago["Papago Translator"]
end

subgraph group_output["Output &amp; Speech"]
  node_chat_mediator["Chat Mediator"]
  node_chat_model["Chat Window Model<br/>[ChatWindowModel.cs]"]
  node_tts_factory["TTS Factory<br/>[TtsFactory.cs]"]
  node_windows_tts["Windows Speech"]
end

subgraph group_settings["Configuration"]
  node_configuration[("Encrypted Settings")]
end

node_user(("User"))
node_screen(("Desktop Screen"))
node_deepl_service["DeepL Service"]
node_google_service["Google Service"]
node_yandex_service["Yandex Service"]
node_papago_service["Papago Service"]

node_user -->|"presses hotkey"| node_hotkeys
node_screen -->|"provides pixels"| node_capture
node_hotkeys -->|"opens selection"| node_selection
node_selection -->|"sets region"| node_capture
node_hotkeys -->|"starts translation"| node_processing
node_capture -->|"provides image"| node_processing
node_processing -->|"detects text"| node_detection
node_detection -->|"requests engines"| node_ocr_factory
node_ocr_factory -->|"creates engine"| node_windows_ocr
node_ocr_factory -->|"creates engine"| node_tesseract
node_ocr_factory -->|"creates engine"| node_easyocr
node_easyocr -->|"executes Python"| node_python
node_detection -->|"scores results"| node_validity
node_detection -->|"caches results"| node_text_cache
node_processing -->|"requests translation"| node_translator_factory
node_translator_factory -->|"selects provider"| node_deepl
node_translator_factory -->|"selects provider"| node_google
node_translator_factory -->|"selects provider"| node_yandex
node_translator_factory -->|"selects provider"| node_papago
node_deepl -.->|"sends request"| node_deepl_service
node_google -.->|"sends request"| node_google_service
node_yandex -.->|"sends request"| node_yandex_service
node_papago -.->|"sends request"| node_papago_service
node_processing -->|"publishes result"| node_chat_mediator
node_chat_mediator -->|"updates overlay"| node_chat_model
node_chat_mediator -.->|"speaks text"| node_tts_factory
node_tts_factory -->|"creates engine"| node_windows_tts

click node_hotkeys "https://github.com/ramjke/translumo/blob/master/src/Translumo/HotKeys/HotKeysServiceManager.cs"
click node_selection "https://github.com/ramjke/translumo/blob/master/src/Translumo/SelectionAreaWindow.xaml.cs"
click node_capture "https://github.com/ramjke/translumo/blob/master/src/Translumo/Services/ScreenCapturerFactory.cs"
click node_processing "https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TranslationProcessingService.cs"
click node_chat_mediator "https://github.com/ramjke/translumo/blob/master/src/Translumo/Services/ChatUITextMediator.cs"
click node_chat_model "https://github.com/ramjke/translumo/blob/master/src/Translumo/MVVM/Models/ChatWindowModel.cs"
click node_detection "https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TextProcessing/TextDetectionProvider.cs"
click node_ocr_factory "https://github.com/ramjke/translumo/blob/master/src/Translumo.OCR/OcrEnginesFactory.cs"
click node_windows_ocr "https://github.com/ramjke/translumo/blob/master/src/Translumo.OCR/WindowsOCR/WindowsOCREngine.cs"
click node_tesseract "https://github.com/ramjke/translumo/blob/master/src/Translumo.OCR/Tesseract/TesseractOCREngine.cs"
click node_easyocr "https://github.com/ramjke/translumo/blob/master/src/Translumo.OCR/EasyOCR/EasyOCREngine.cs"
click node_python "https://github.com/ramjke/translumo/blob/master/src/Translumo.Infrastructure/Python/PythonEngineWrapper.cs"
click node_validity "https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TextProcessing/TextValidityPredictor.cs"
click node_text_cache "https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TextProcessing/TextResultCacheService.cs"
click node_translator_factory "https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/TranslatorFactory.cs"
click node_deepl "https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/Deepl/DeeplTranslator.cs"
click node_google "https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/Google/GoogleTranslator.cs"
click node_yandex "https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/Yandex/YandexTranslator.cs"
click node_papago "https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/Papago/PapagoTranslator.cs"
click node_tts_factory "https://github.com/ramjke/translumo/blob/master/src/Translumo.TTS/TtsFactory.cs"
click node_windows_tts "https://github.com/ramjke/translumo/blob/master/src/Translumo.TTS/Engines/WindowsTTSEngine.cs"
click node_configuration "https://github.com/ramjke/translumo/blob/master/src/Translumo/Configuration/ConfigurationStorage.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_hotkeys,node_selection,node_capture,node_processing,node_user,node_screen toneBlue
class node_detection,node_ocr_factory,node_windows_ocr,node_tesseract,node_easyocr,node_python,node_validity,node_text_cache toneAmber
class node_translator_factory,node_deepl,node_google,node_yandex,node_papago toneMint
class node_chat_mediator,node_chat_model,node_tts_factory,node_windows_tts toneRose
class node_configuration,node_deepl_service,node_google_service,node_yandex_service,node_papago_service toneIndigo
```

## Components

### Input & Capture

- [Hotkey Manager](https://github.com/ramjke/translumo/blob/master/src/Translumo/HotKeys/HotKeysServiceManager.cs): `src/Translumo/HotKeys/HotKeysServiceManager.cs`
- [Selection Window](https://github.com/ramjke/translumo/blob/master/src/Translumo/SelectionAreaWindow.xaml.cs): `src/Translumo/SelectionAreaWindow.xaml.cs`
- [Screen Capturer](https://github.com/ramjke/translumo/blob/master/src/Translumo/Services/ScreenCapturerFactory.cs): `src/Translumo/Services/ScreenCapturerFactory.cs`
- [Translation Processing](https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TranslationProcessingService.cs): `src/Translumo.Processing/TranslationProcessingService.cs`

### Text Recognition

- [Text Detection](https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TextProcessing/TextDetectionProvider.cs): `src/Translumo.Processing/TextProcessing/TextDetectionProvider.cs`
- [OCR Factory](https://github.com/ramjke/translumo/blob/master/src/Translumo.OCR/OcrEnginesFactory.cs): `src/Translumo.OCR/OcrEnginesFactory.cs`
- [Windows OCR](https://github.com/ramjke/translumo/blob/master/src/Translumo.OCR/WindowsOCR/WindowsOCREngine.cs): `src/Translumo.OCR/WindowsOCR/WindowsOCREngine.cs`
- [Tesseract OCR](https://github.com/ramjke/translumo/blob/master/src/Translumo.OCR/Tesseract/TesseractOCREngine.cs): `src/Translumo.OCR/Tesseract/TesseractOCREngine.cs`
- [EasyOCR](https://github.com/ramjke/translumo/blob/master/src/Translumo.OCR/EasyOCR/EasyOCREngine.cs): `src/Translumo.OCR/EasyOCR/EasyOCREngine.cs`
- [Python Runtime](https://github.com/ramjke/translumo/blob/master/src/Translumo.Infrastructure/Python/PythonEngineWrapper.cs): `src/Translumo.Infrastructure/Python/PythonEngineWrapper.cs`
- [Text Validity Model](https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TextProcessing/TextValidityPredictor.cs): `src/Translumo.Processing/TextProcessing/TextValidityPredictor.cs`
- [Text Result Cache](https://github.com/ramjke/translumo/blob/master/src/Translumo.Processing/TextProcessing/TextResultCacheService.cs): `src/Translumo.Processing/TextProcessing/TextResultCacheService.cs`

### Translation

- [Translator Factory](https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/TranslatorFactory.cs): `src/Translumo.Translation/TranslatorFactory.cs`
- [DeepL Translator](https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/Deepl/DeeplTranslator.cs): `src/Translumo.Translation/Deepl/DeeplTranslator.cs`
- [Google Translator](https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/Google/GoogleTranslator.cs): `src/Translumo.Translation/Google/GoogleTranslator.cs`
- [Yandex Translator](https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/Yandex/YandexTranslator.cs): `src/Translumo.Translation/Yandex/YandexTranslator.cs`
- [Papago Translator](https://github.com/ramjke/translumo/blob/master/src/Translumo.Translation/Papago/PapagoTranslator.cs): `src/Translumo.Translation/Papago/PapagoTranslator.cs`

### Output & Speech

- [Chat Mediator](https://github.com/ramjke/translumo/blob/master/src/Translumo/Services/ChatUITextMediator.cs): `src/Translumo/Services/ChatUITextMediator.cs`
- [Chat Window Model](https://github.com/ramjke/translumo/blob/master/src/Translumo/MVVM/Models/ChatWindowModel.cs): `src/Translumo/MVVM/Models/ChatWindowModel.cs`
- [TTS Factory](https://github.com/ramjke/translumo/blob/master/src/Translumo.TTS/TtsFactory.cs): `src/Translumo.TTS/TtsFactory.cs`
- [Windows Speech](https://github.com/ramjke/translumo/blob/master/src/Translumo.TTS/Engines/WindowsTTSEngine.cs): `src/Translumo.TTS/Engines/WindowsTTSEngine.cs`

### Configuration

- [Encrypted Settings](https://github.com/ramjke/translumo/blob/master/src/Translumo/Configuration/ConfigurationStorage.cs): `src/Translumo/Configuration/ConfigurationStorage.cs`

### Other components

- **User**
- **Desktop Screen**
- **DeepL Service**
- **Google Service**
- **Yandex Service**
- **Papago Service**

## Connections

- User → Hotkey Manager: presses hotkey
- Desktop Screen → Screen Capturer: provides pixels
- Hotkey Manager → Selection Window: opens selection
- Selection Window → Screen Capturer: sets region
- Hotkey Manager → Translation Processing: starts translation
- Screen Capturer → Translation Processing: provides image
- Translation Processing → Text Detection: detects text
- Text Detection → OCR Factory: requests engines
- OCR Factory → Windows OCR: creates engine
- OCR Factory → Tesseract OCR: creates engine
- OCR Factory → EasyOCR: creates engine
- EasyOCR → Python Runtime: executes Python
- Text Detection → Text Validity Model: scores results
- Text Detection → Text Result Cache: caches results
- Translation Processing → Translator Factory: requests translation
- Translator Factory → DeepL Translator: selects provider
- Translator Factory → Google Translator: selects provider
- Translator Factory → Yandex Translator: selects provider
- Translator Factory → Papago Translator: selects provider
- DeepL Translator → DeepL Service: sends request
- Google Translator → Google Service: sends request
- Yandex Translator → Yandex Service: sends request
- Papago Translator → Papago Service: sends request
- Translation Processing → Chat Mediator: publishes result
- Chat Mediator → Chat Window Model: updates overlay
- Chat Mediator → TTS Factory: speaks text
- TTS Factory → Windows Speech: creates engine
