Skip to content

RohitDhatrak/BookToAudioBook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pre

  • Python 3.9-3.12 (Python 3.13+ is not currently supported)

Setup

  1. Assumes python is setup (if you have a higher version setup a python venv)
  2. Download and install Calibre application (https://calibre-ebook.com/download)
  3. Run brew install calibre
  4. Run pip install kokoro-tts
  5. Download model files (in the venv) i. wget https://github.com/nazdridoy/kokoro-tts/releases/download/v1.0.0/voices-v1.0.bin ii. wget https://github.com/nazdridoy/kokoro-tts/releases/download/v1.0.0/kokoro-v1.0.onnx

Convert epub to audiobook

  1. Create a new folder inside /books directory and put your epub file in that folder
  2. Run python 00_epub_to_txt.py <folder_name>
  3. Review the output.txt file generated inside the folder remove any unwanted content
  4. Run python 01_text_cleanup.py <folder_name> to clean up the generated text
  5. Run python 02_split_chapters.py <folder_name> to split the book into chapterwise text files
  6. Run python 03_txt_to_speech.py ./<folder_name>/chapters/<input_file_name>.txt ./<folder_name>/audio/<output_file_name.wav> to convert a single file into audio or python 03_txt_to_speech.py <folder_name> to convert all the files

About

Converts a book in epub format to an chapterwise audiobook

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages