← all repositories
oomol-lab/epub-translator

Translate EPUBs by LLM without erasing the original

It turns monolingual EPUBs into bilingual editions by piping them through an LLM while preserving the original markup, layout, and images.

806 stars Python Language ModelsDomain Apps
epub-translator
Not currently ranked — collecting fresh signals.
star history

What it does

EPUB Translator takes an EPUB file and sends its text through a configurable LLM—OpenAI, Azure, or any OpenAI-compatible endpoint. It reconstructs the ebook with translated text inserted either as block-level siblings to the original paragraphs or as inline replacements, leaving images and document structure untouched. The result is a single EPUB file that contains both languages, useful for language learning or reference reading.

The interesting bit

The tool treats EPUB’s XML skeleton as a first-class problem rather than an afterthought. It offers a dual-LLM mode that assigns one model to creative translation and a second, lower-temperature model to the finicky work of stitching that translation back into the original XML tree, which helps keep the ebook from breaking.

Key highlights

  • Supports three output modes: full replacement, inline bilingual text, or recommended block-level side-by-side paragraphs.
  • Compatible with any OpenAI-style API endpoint, including Azure OpenAI and self-hosted alternatives.
  • Includes retry logic with FillFailedEvent callbacks so you know if a translation error actually survived into the final file.
  • Caches progress to disk, allowing a long translation job to resume after a crash or rate-limit rather than restarting from page one.
  • Exposes both a Python API and a visual workflow through OOMOL Studio, plus a hosted online version called Inkora.

Caveats

  • If the XML-filling step fails after all retries, the error is baked into the final EPUB; the tool warns you via callback, but does not halt the build.

Verdict

Language learners and researchers who want to read original prose alongside an LLM translation should grab this. If you just need a quick plain-text dump of a foreign book, simpler tools will do the job without the XML gymnastics.

Frequently asked

What is oomol-lab/epub-translator?
It turns monolingual EPUBs into bilingual editions by piping them through an LLM while preserving the original markup, layout, and images.
Is epub-translator open source?
Yes — oomol-lab/epub-translator is open source, released under the MIT license.
What language is epub-translator written in?
oomol-lab/epub-translator is primarily written in Python.
How popular is epub-translator?
oomol-lab/epub-translator has 806 stars on GitHub.
Where can I find epub-translator?
oomol-lab/epub-translator is on GitHub at https://github.com/oomol-lab/epub-translator.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.