TranslateBooksWithLLMs is a free, open source publishing project written in Python and released under AGPL-3.0. It has 2,416 GitHub stars, 319 forks and 23 open issues, and was last pushed 15 hours ago. On this registry it ranks #21 of 46 tracked projects in Publishing, with 5 head-to-head comparisons available. It gained 7 stars over the last 3 tracked days.

What is TranslateBooksWithLLMs?

What it is

TranslateBooksWithLLMs is a Python desktop application under AGPL-3.0 for translating full-length books, documents, and subtitle files with large language models. It lives in the Content and Publishing ecosystem, specifically around ebook translation, document localization, and publishing-related workflows. The project ships as a local app that opens a browser interface at http://localhost:5000 after the bundled executable is run.

The concrete problem it addresses is translating long files while preserving document structure and continuing interrupted work. The README states that EPUB, SRT, DOCX, and TXT files can be processed with no file size limit, and that an intelligent chunking system preserves context between segments. It also states that formatting is preserved: EPUB styles and structure remain intact, SRT timecodes stay synchronized, and tags and timestamps are kept.

Key capabilities

  • The application translates EPUB, SRT, DOCX, and TXT files through a desktop interface that accepts a file and a target language.
  • It processes documents of any length by chunking content while preserving context between segments.
  • It preserves EPUB formatting, styles, and structure, and it keeps SRT timecodes synchronized.
  • It saves automatic checkpoints, so an interrupted translation can resume where it stopped.
  • It supports reusable writing style presets extracted from sample books or written by hand.
  • It applies a consistent register, rhythm, and imagery across chunks when a style preset is used.
  • When Auto is selected, it derives a glossary and style from the document with one extra LLM call each before the job starts, and it saves nothing.

Who uses it and how

  • Individual readers or translators convert EPUB books into another language while keeping the original ebook structure.
  • Subtitle editors translate SRT files and rely on the tool to preserve timecodes.
  • Document users translate DOCX or TXT files with no file size limit.
  • Privacy-focused users run Ollama locally so translation requests do not leave their machine.
  • Users connect DeepSeek, Gemini, Mistral, NVIDIA NIM, OpenAI, OpenRouter, or Poe with an API key, or they connect Ollama or an OpenAI-compatible server locally.

Getting started

Users download a Windows or macOS release archive, extract it, run TranslateBook.exe or ./TranslateBook, and open http://localhost:5000 in a browser; the README also mentions installing from source. On first launch they choose a provider, such as Ollama locally, a cloud provider by API key, or an OpenAI-compatible server by endpoint.

When to use it — and when not to

TranslateBooksWithLLMs is useful when the main need is long-file translation with format preservation and resume support, especially for EPUB and SRT workflows. It is less suitable when users need a hosted web service, because the README describes a desktop app that runs locally and exposes a localhost interface. It also depends on the selected model or provider, so local users must operate Ollama or another OpenAI-compatible server, while cloud users must supply API keys.

project readme (upstream, from github) — read inline

TBL - Translate Books with LLMs

Download Windows Download macOS Intel Download macOS Apple Silicon

A desktop app that translates books, subtitles, and documents with AI - local or cloud. Drop a file, pick a language, get the result.

Formats: EPUB, SRT, DOCX, TXT

  • No size limit. Process documents of any length - from a single page to thousand-page novels. The intelligent chunking system handles unlimited content while preserving context between segments.
  • Perfect preservation. Your documents come out exactly as they went in: EPUB formatting, styles, and structure remain intact. SRT timecodes stay perfectly synchronized. Every tag, every timestamp, every formatting detail is preserved.
  • Resume anytime. Interrupted translation? Pick up exactly where you left off. The checkpoint system saves progress automatically.
  • Reusable writing styles. Extract a style preset from sample books (or write one by hand) and apply it to every chunk for a consistent register, rhythm, and imagery across the whole translation.
  • Auto glossary & style. No glossary or preset ready? Pick Auto in the dropdown and the app derives both straight from the document being translated - one extra LLM call each before the job starts, nothing saved.
image

Translation Quality Benchmarks - Find the best model for your target language.


Quick Start

  1. Download the release for your platform (buttons above), or grab it from the releases page.
  2. Extract the archive.
  3. Run TranslateBook.exe (Windows) or ./TranslateBook (macOS).
  4. Open http://localhost:5000 in your browser.

That's it. On first launch, you choose a translation provider:

  • Free & local - Install Ollama and pull a model (e.g. ollama pull qwen3:14b). Nothing leaves your machine.
  • Cloud (often free tier available) - Paste an API key from one of the providers below.

Note: First run creates a TranslateBook_Data folder with your settings.

macOS: On first launch, go to System Settings > Privacy & Security and click Open Anyway.


Providers

                    

Provider Type Get started
DeepSeek Cloud platform.deepseek.com
Gemini Cloud Google AI Studio
Mistral Cloud console.mistral.ai
NVIDIA NIM Cloud build.nvidia.com
Ollama Local ollama.com
OpenAI Cloud platform.openai.com
OpenAI-Compatible Local (llama.cpp, LM Studio, vLLM, LocalAI...) Point to your server's endpoint
OpenRouter Cloud (200+ models) openrouter.ai/keys
Poe Cloud (multi-model) poe.com/api_key

See docs/PROVIDERS.md for detailed setup instructions.


Troubleshooting

Problem Solution
Ollama won't connect Check Ollama is running, test curl http://localhost:11434/api/tags
Model not found Run ollama list, then ollama pull model-name

See docs/TROUBLESHOOTING.md for more solutions.


Advanced

Install from source

Prerequisites: Python 3.8+, Ollama, Git

git clone https://github.com/hydropix/TranslateBooksWithLLMs.git
cd TranslateBookWithLLM
ollama pull qwen3:14b    # Download a model

# Windows
start.bat

# Mac/Linux
chmod +x start.sh && ./start.sh

The web interface opens at http://localhost:5000.

Command line
# Basic (auto-generates "book (Chinese).epub")
python translate.py -i book.epub -sl English -tl Chinese

# With OpenRouter
python translate.py -i book.txt --provider openrouter \
    --openrouter_api_key YOUR_KEY -m anthropic/claude-sonnet-4 -tl French

# With OpenAI
python translate.py -i book.txt --provider openai \
    --openai_api_key YOUR_KEY -m gpt-4o -tl French

# With Gemini
python translate.py -i book.txt --provider gemini \
    --gemini_api_key YOUR_KEY -m gemini-2.0-flash -tl French

# With Mistral
python translate.py -i book.txt --provider mistral \
    --mistral_api_key YOUR_KEY -m mistral-large-latest -tl French

# With DeepSeek
python translate.py -i book.txt --provider deepseek \
    --deepseek_api_key YOUR_KEY -m deepseek-v4-pro -tl French

# With Poe
python translate.py -i book.txt --provider poe \
    --poe_api_key YOUR_KEY -m Claude-Sonnet-4 -tl French

# With NVIDIA NIM
python translate.py -i book.txt --provider nim \
    --nim_api_key YOUR_KEY -m meta/llama-3.1-8b-instruct -tl French

# With local OpenAI-compatible server (llama.cpp, LM Studio, vLLM, etc.)
python translate.py -i book.txt --provider openai \
    --api_endpoint http://localhost:8080/v1/chat/completions -m your-model -tl French

Main options

Option Description Default
-i, --input Input file Required
-o, --output Output file Auto: {name} ({lang}).{ext}
-sl, --source_lang Source language English
-tl, --target_lang Target language Chinese
-m, --model Model name qwen3:14b
--provider ollama/openrouter/openai/gemini/mistral/deepseek/poe/nim ollama
--parallel Chunks translated concurrently (cloud only; Ollama stays at 1) 1
--text-cleanup OCR/typographic cleanup disabled
--refine Second pass for literary polish disabled
--tts Generate audio (Edge-TTS) disabled

See docs/CLI.md for all options (TTS voices, rates, formats, etc.).

Configuration (.env)

Copy .env.example to .env and edit:

# Provider
LLM_PROVIDER=ollama

# Ollama
API_ENDPOINT=http://localhost:11434/api/generate
DEFAULT_MODEL=qwen3:14b

# API Keys (if using cloud providers)
OPENROUTER_API_KEY=sk-or-v1-...
OPENAI_API_KEY=sk-...
GEMINI_API_KEY=...
MISTRAL_API_KEY=...
DEEPSEEK_API_KEY=...
POE_API_KEY=...
NIM_API_KEY=...

# Performance
REQUEST_TIMEOUT=900
MAX_TOKENS_PER_CHUNK=450     # Token-based chunking (default: 450 tokens)
PARALLEL_TRANSLATIONS=1      # Concurrent chunks (cloud only; Ollama stays at 1)

Faster on cloud providers? Set PARALLEL_TRANSLATIONS (or --parallel N, or the "Parallel requests" field in the web UI) above 1 to translate several chunks at once. Local providers (Ollama) ignore it since a single instance serializes requests. Higher values are faster but can hit provider rate limits.

Multiple API keys? Any *_API_KEY variable accepts a comma-separated list (e.g. GEMINI_API_KEY=key1,key2,key3). The system rotates between keys automatically when one hits a rate

readme truncated — read the full docs on github

Frequently asked questions

Is TranslateBooksWithLLMs free to use?

TranslateBooksWithLLMs is open source under the AGPL-3.0 licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does TranslateBooksWithLLMs do?

Translate full-length books and documents with Ollama, OpenAI-compatible, Gemini, Mistral, DeepSeek, Poe or OpenRouter. Preserves formatting. Resumes where you

What is TranslateBooksWithLLMs written in?

TranslateBooksWithLLMs is primarily written in Python. Its source is publicly available at https://github.com/hydropix/TranslateBooksWithLLMs, and it has 2,416 GitHub stars.