Skip to content

cat-in-a-box/Decky-Translator

Repository files navigation

Decky Translator

GitHub Release License Build Status

Ko-fi

A Decky Loader plugin that lets you translate any text on your Steam Deck screen.

It captures your screen, recognizes text using OCR, translates it and then shows the result with screen overlay.

Might be helpful for learning a new language by playing games or some other purposes (you tell me!).

Screenshot

Translation Demo

Requirements

  • Steam Deck (LCD or OLED)
  • Decky Loader installed
  • Internet connection for web-based text recognition and translation services

Installation

From Decky Plugin Store

  1. Install Decky Loader on your Steam Deck
  2. Open (...) side bar and move down to Decky menu
  3. Select store icon to view all the available plugins
  4. Search for "Decky Translator" and install it

Manual Installation

  1. Install Decky Loader on your Steam Deck
  2. Download the latest release from the Releases page
  3. Upload Decky.Translator.zip archive to any directory on your Steam Deck
  4. Open Decky Loader settings and go to Developer section
  5. Install Plugin from ZIP file -> "Browse" and then select Decky.Translator.zip

How to use it?

  1. Press "Translate" button in the main tab of the plugin
  2. Press (...) to open the menu again and press "Close Overlay"

How to quickly use it?

  1. Hold L4 button for a Quick Translation
  2. Hold L4 button again to disable the translation overlay

Button or Combinations can be configured in the Controls tab

How does it do that?

Decky Translator allows you to choose different Text Recognition and Translation methods - feel free to experiment.

Text Recognition (OCR)

Provider Description Requirements
RapidOCR On-device OCR. Screenshots never leave your device -
OCR.space Free EU-based Cloud OCR API with some usage limitations. Good choice if you dont need to translate very often Internet
Google Cloud Vision Best accuracy and speed. Great for complex/stylized text. Has a great free tier, but requires some setup Internet + API key

Translation

Provider Description Requirements
Google Translate It's Google. And it translates Internet
Google Cloud Translation High quality translations Internet + API key

Note: Google Cloud services require an API key but offer a generous free tier for personal use.

Hey, I want better results. How do I get this Google Cloud API Key?

Step 1: Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Click "Select a project" at the top, then "New Project"
  3. Give your project a name (any name would work) and click "Create"

Step 2: Enable Required APIs

  1. Go to APIs & Services > Library
  2. Search for and enable:
    • Cloud Vision API
    • Cloud Translation API

Step 3: Create an API Key

  1. Go to APIs & Services > Credentials
  2. Click "Create Credentials" > "API Key"
    • Authenticate API calls through a service account: keep unchecked
    • Application Restrictions: None
  3. Copy your new API key
  4. If you need to find this API key later - press "Show key" button

API-Key-page API-Key-modal

Step 4: (Optional) Restrict Your API Key

For security, you can restrict the API key to only the Vision and Translation APIs:

  1. Click on your API key in the Credentials page
  2. Under "API restrictions", select "Restrict key"
  3. Select "Cloud Vision API" and "Cloud Translation API"
  4. Click "Save"

API-Key-Restriction

Step 5: Add API Key to Plugin

  1. Open the Decky Translator plugin on your Steam Deck
  2. Go to the Translation tab
  3. Select Google Cloud Vision and/or Google Cloud Translation as your providers
  4. Click "Set Key"
  5. Enter your Google Cloud API key
  6. Click "Save"

API Key usually looks like this (but you should have your own):

API-Key-SteamOS

IMPORTANT: NEVER SHARE THIS API KEY WITH ANYONE!

Pricing Note

Google Cloud offers a free tier that should be sufficient for personal use:

  • Vision API: First 1,000 units/month free
  • Translation API: First 500,000 characters/month free

From my own experience, even everyday usage of Decky Translator with Google Cloud for both recognition and translation rarely goes beyond their free tier. Only once I had to pay around 1€/month - and that was during VERY active development and testing phase.

But if you want to stay on the safe side anyway - you could set up a budget limit and notification in Billing > Budgets & Alerts

API-Key-Budget

Troubleshooting

Black screen on capture

Try triggering translation again. If persistent, reboot your Steam Deck

Translated text is too small

Try increasing the "Font Scaling" option in plugin settings

Plugin says I'm using a wrong API key

Double-check that you entered it correctly. If the issue persists, please raise an issue - let's investigate it together

I see nothing / Recognition is bad

Try other text recognition methods - RapidOCR may not work well with stylized or pixelated text. I also plan to continuously work on recognition quality, so you can expect improvements over time

I have Bazzite, and the plugin does not work

Decky Translator does not currently support Bazzite. Stay tuned for future releases - this may change

To-Do

Functional

  • Add offline OCR functionality
  • Fix interface scaling issues on non-default SteamOS values (experimental)
  • Rework temporary files solution
  • Gamepad support
  • Overlay font scaling for large monitors
  • Fully offline Translation functionality
  • Disable in-game buttons while overlay is active
  • Desktop mode support
  • Nicer look for translation overlay
  • TTS for translated text (press the translated label to listen)

Languages

  • Arabic support for RapidOCR
  • Hindi support for RapidOCR
  • Add Finnish language
  • Add Romanian language
  • Add Bulgarian language
  • Add Vietnamese language

Third-Party Dependencies

This plugin downloads and uses the following third-party components:

RapidOCR Models (PP-OCRv5)

Based on PaddleOCR models (Apache 2.0), exported to ONNX format.

File Purpose
ch_PP-OCRv5_mobile_det.onnx Text detection model (shared across all languages)
ch_rec.onnx + ch_dict.txt Chinese/Japanese/English recognition
english_rec.onnx + english_dict.txt English recognition
latin_rec.onnx + latin_dict.txt Latin script (French, German, Spanish, etc.)
eslav_rec.onnx + eslav_dict.txt East Slavic (Russian, Ukrainian)
korean_rec.onnx + korean_dict.txt Korean recognition
greek_rec.onnx + greek_dict.txt Greek recognition
thai_rec.onnx + thai_dict.txt Thai recognition
ch_ppocr_mobile_v2.0_cls_infer.onnx Text direction classifier

Python Packages (from PyPI)

Package License Purpose
Pillow==11.2.1 MIT-CMU Image processing for screenshot handling
requests==2.32.3 Apache 2.0 HTTP library for API calls
urllib3==2.4.0 MIT HTTP client (dependency of requests)
rapidocr>=3.6.0 Apache 2.0 OCR engine that runs the PP-OCRv5 ONNX models
onnxruntime>=1.7.0 MIT ONNX model inference runtime

Support

If you find this plugin useful - feel free to buy me a cup of coffee ❤️

Ko-fi

Thanks to

  • Valve for creating the Steam Deck - a beautiful device that makes projects like this possible
  • UGT (Universal Game Translator) by Seth Robinson for inspiration and the idea of using game translation as a language learning tool
  • Decky Loader team for the plugin framework
  • Steam Deck Homebrew community for their amazing plugins, which served as a great reference while building this one
  • PaddleOCR, RapidOCR and MeKo-Christian for OCR engine, OCR models and ONNX model exports that make offline text recognition possible
  • OCR.space for the free OCR API
  • Google Cloud for Vision and Translation API
  • And You. Yes, You 😉