AI Personal Learning
and practical guidance

Bilingual Book Maker: Use AI translation to make bilingual e-books, full book automated translation tool

General Introduction

Bilingual Book Maker is an open source project designed to help users create multilingual versions of eBooks using AI technology. The tool mainly uses ChatGPT for translation and supports a variety of file formats, including epub, txt and srt. Bilingual Book Maker is designed for translating eBooks that are in the public domain, and is not applicable to copyrighted works. Users need to prepare the API key for ChatGPT or OpenAI and provide the eBook file to be translated. The program supports a variety of AI models, such as GPT-4, GPT-3.5-turbo, etc. Users can choose different models for translation according to their needs.

Bilingual Book Maker: Using AI Translation to Make Bilingual eBook Tools-1


 

Function List

  • Multi-language support: Support for translating eBooks into multiple languages.
  • File format compatibility: supports epub, txt and srt file formats.
  • Multi-model selection: Supports a variety of AI models such as GPT-4, GPT-3.5-turbo, and so on.
  • API Key Management: Support multiple API keys to reduce errors caused by API call limitations.
  • Environment Configuration: Supports Python 3.8+ and provides detailed installation and usage instructions.
  • Sample Books: Sample books for testing are provided for quick start.

 

Using Help

Installation process

  1. Preparing the environment: Ensure that the system has Python 3.8+ installed and has Internet access or a proxy.
  2. cloning project: Run the following command in the terminal to clone the project:
   git clone https://github.com/yihong0618/bilingual_book_maker.git
cd bilingual_book_maker
  1. Installation of dependencies: Run the following command to install the project dependencies:
   pip install -r requirements.txt
  1. Configuring the API Key: Set the OpenAI API key as an environment variable or specify it when running commands:
   export BBM_OPENAI_API_KEY=your_openai_key

Usage Process

  1. Preparation of book documents: Place the epub or txt file to be translated in the project directory.
  2. Run the translation command: Use the following command to translate:
   python3 make_book.py --book_name your_book.epub --openai_key your_openai_key

Or use the pip install command:

   pip install -U bbook_maker
bbook --book_name your_book.epub --openai_key your_openai_key
  1. Selecting a Translation Model: The GPT-3.5-turbo model is used by default and can be accessed via the---modelparameter specifies other models:
   python3 make_book.py --book_name your_book.epub --openai_key your_openai_key --model gpt4
  1. View translation results: Once the translation is complete, the resulting bilingual eBook will be saved in the project directory under the filenameyour_book_bilingual.epubThe

Detailed Function Operation

  • Multi-API key support: If there is more than one API key, it can be specified in the command separated by commas to reduce errors caused by API call restrictions:
  python3 make_book.py --book_name your_book.epub --openai_key key1,key2,key3
  • Translation label designation: only translates by default<p>Tagged content, which can be accessed via the---translate-tagsparameter specifies additional labels:
  python3 make_book.py --book_name your_book.epub --openai_key your_openai_key --translate-tags h1,h2,h3,p,div
  • Proxy Settings: If you need to use a proxy, you can pass the--proxyparameter specifies the proxy server:
  python3 make_book.py --book_name your_book.epub --openai_key your_openai_key --proxy http://127.0.0.1:7890
  • Disruption Recovery: If the translation process is interrupted, you can use the--resumeParameters are manually restored:
  python3 make_book.py --book_name your_book.epub --openai_key your_openai_key --resume
May not be reproduced without permission:Chief AI Sharing Circle " Bilingual Book Maker: Use AI translation to make bilingual e-books, full book automated translation tool

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish