Translate manga or comic speech bubbles directly in your web browser. This project uses a Local Python Server (FastAPI) to process the images, ensuring your translations are unlimited, private, and free!
- Open a terminal in this directory.
- Install PyTorch with CUDA support (since you have an NVIDIA GPU, this will make OCR much faster):
Visit PyTorch's official Get Started page to find the exact command for your CUDA version.
For example, if you have CUDA 11.8:
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
- Install the rest of the dependencies:
pip install -r requirements.txt
- Setup the Font:
- Download a Thai
.ttffont (e.g., 'Mali' or 'Itim' from Google Fonts). - Create a folder named
fontin this directory if it does not exist. - Place the downloaded
.ttffile inside thefontfolder and name itthai_comic.ttf.
- Download a Thai
- Start the Server:
Note: Leave this terminal window running in the background. The first time you start it, it may take a minute to load the OCR models into your GPU.
uvicorn server:app --port 8000
- Open Google Chrome and go to
chrome://extensions/. - Toggle on "Developer mode" in the top right corner.
- Click the "Load unpacked" button in the top left.
- Select the
extensionfolder located inside this project directory (d:\Work\Code\Manga Translator\extension). - Pin the "Local Scan Translator" extension to your Chrome toolbar for easy access!
- Make sure your Python
uvicornserver is running. - Visit any website where you are reading manga or comics.
- Click the Local Scan Translator icon in your Chrome toolbar.
- Select your language (Japanese -> Thai OR English -> Thai).
- Click "Start Snipping".
- Your cursor will turn into a crosshair. Click and drag a red box tightly around a speech bubble on the page.
- Wait a few seconds. The text will be extracted, translated, typeset, and injected back into the web page, perfectly overlaying the original bubble!