About this project
Bilingual Book Maker is an AI translation tool that uses ChatGPT and other large language models to assist users in creating multi-language versions of epub, txt, md, srt, and pdf files and books. The tool supports a wide range of translation services and API endpoints, including OpenAI, Anthropic (Claude), Google Gemini, Qwen, Groq, xAI, DeepL, Google Translate, Caiyun, Tencent TranSmart, Ollama, LiteLLM, OrcaRouter, and Codex.
The tool can be installed via pip (bbook_maker) or by cloning the repository. It requires Python 3.10+ and an API key for the chosen translation service. A sample book (animal_farm.epub) is provided for testing purposes, and the --test flag translates only the first few paragraphs.
Key features include:
- Support for multiple file formats: epub, txt, md, srt, and pdf
- Session-based translation with context compaction for consistency across the entire book
- Automatic glossary learning from handoff reports to keep recurring names stable
- Plan mode for epub files that classifies HTML tags to determine what to translate
- Custom API provider configuration via JSON config files
- Support for custom prompts with system, user, and style roles
- Batch translation with configurable batch sizes and accumulated token limits
- Resume capability after interruptions
- Proxy support for internet access
- Tag classification and exclusion options for epub files
- Cost tracking with price configuration for providers
The tool generates bilingual output files: for EPUB inputs, a bilingual epub is created; for TXT/MD/SRT inputs, bilingual text or subtitle files are generated; for PDF inputs, a bilingual txt fallback is produced along with an attempted epub conversion.
The tool emphasizes responsible use, advising users to only translate material they have the right to translate, including works they hold rights to, suitably licensed or permitted works, public-domain books, or uses otherwise allowed by applicable law.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.