yihong0618/bilingual_book_maker
Make bilingual epub books Using AI translate
What it solves
This project automates the creation of bilingual books by translating source files (EPUB, TXT, MD, SRT, or PDF) into a target language while preserving the original formatting. It is designed to help users create side-by-side translated versions of documents using various AI models and translation services.
How it works
The tool processes input files by extracting text content—typically from HTML tags like <p> in EPUBs—and sending it to a chosen translation provider. It supports a wide range of endpoints, including OpenAI, Anthropic, Gemini, Qwen, and various translation APIs like DeepL and Google Translate. Users can configure the translation process via command-line arguments or a JSON configuration file, allowing for features like session-based context for consistent terminology, automatic tag classification to decide which parts of a document to translate, and progress tracking.
Who it’s for
It is for individuals who want to create bilingual editions of books or documents they own or have the rights to translate. It is particularly useful for users who want to leverage specific LLMs or translation services to automate the labor-intensive process of manual translation.
Highlights
- Supports multiple file formats including EPUB, TXT, MD, SRT, and PDF.
- Compatible with a broad range of AI providers (OpenAI, Anthropic, Gemini, Groq, Ollama, etc.) and dedicated translation services.
- Includes a "Plan mode" that uses AI to intelligently classify which sections of a book should be translated.
- Provides session-based context management to ensure consistent translation of names and terminology throughout a document.
- Allows for custom provider configurations via JSON, enabling the use of any OpenAI-compatible API.
Related
- Project
- Project
- Project
- Project
- Project