hydropix/TranslateBooksWithLLMs
Translate full-length books and documents with Ollama, OpenAI-compatible, Gemini, Mistral, DeepSeek, Poe or OpenRouter. Preserves formatting. Resumes where you left off. No file size limits.
What it solves
Translating a full book manually is slow, and most machine translation tools break formatting, lose context across pages, or cap document length. This project is a desktop application that translates complete EPUB, SRT, DOCX, PDF, TXT, and PGN files in one go, keeping the original structure intact — EPUB styles, subtitle timings, PDF tables, chess comments — while letting you use either a free local model or a commercial cloud API.
How it works
You drop a file into the web interface (or use the command line), pick source and target languages, choose a translation provider, and start. The app splits the document into small token-based chunks (default 450 tokens) so it can handle books of any length while preserving context between segments. It sends each chunk to your chosen LLM — either Ollama running locally (nothing leaves your machine) or a cloud provider like OpenAI, Gemini, DeepSeek, or OpenRouter. A checkpoint system saves progress automatically, so if the job is interrupted you can resume from where it stopped. It also supports extracting a reusable writing-style preset from sample books, auto-building a glossary and style from the document itself, and optionally doing a second “refine” pass for literary polish. PDF translation rebuilds the layout (headings, paragraphs, images, tables) but does not preserve the original pagination, and scanned PDFs are not supported. PGN translation only changes the prose comments, leaving chess moves, tags, and diagrams untouched.
Who it’s for
Authors or publishers translating their own books, students and researchers handling long documents, subtitle translators, chess players who want annotated games in another language, and anyone with a large file who wants to keep the original layout while using modern LLMs. It works for casual users (download and run) and power users (command line, Docker, multi-device shared workspace).
Highlights
- No size limit — chunking handles everything from one page to thousand-page novels
- Formatting preserved: EPUB styles, SRT timecodes, PDF headings/tables, PGN moves and comments
- Works fully offline with Ollama, or with cloud providers — many have free tiers
- Resume interrupted translations thanks to automatic checkpoints
- Apply an extracted writing style to every chunk for consistent tone
- Auto-glossary and style extraction from the document itself
- Parallel translation on cloud providers for speed, with automatic API key rotation when you hit rate limits
- Run from the web UI in a browser, from the command line, or in Docker
Related
- Project
- Project
- Project
- Project
- Project