Skip to content

Local TTS Audiobook generation converting EPUB files to audiobooks, designed to work with an iOS App of the same name

License

Notifications You must be signed in to change notification settings

BounceU/BenReader

Repository files navigation

Contributors Forks Stargazers Issues project_license LinkedIn


Logo

BenReader

A local Text-to-speech AI audiobook generator, converting EPUB files into audiobooks. Designed to work with a companion iOS app, but can be used to generate standard audio files as well.

About The Project

BenReader is a Java app and Python CLI that uses the Kokoro-82m TTS model.

(back to top)

Contact

Ben Liebkemann - ben@liebkemann.com

Project Link: https://github.com/BounceU/BenReader

(back to top)

Getting Started

Downloads

https://github.com/BounceU/BenReader/releases

Building the project locally

Prerequisites

  1. Clone the repo

    git clone https://github.com/BounceU/BenReader
  2. Build the maven project (in JavaSide/benreader/):

    mvn clean compile assembly:single
  3. Set up your conda environment (in PythonSide/):

    conda env create -f environment.yaml
    conda activate book_ai
    python -m spacy download en_core_web_sm
  4. Build the python project using pyinstaller (in PythonSide/):

    pyinstaller --onedir tts_epub.py --add-data "YOUR_MINICONDA_INSTALLATION/envs/book_ai/Lib/site-packages;." --noconfirm
  5. Setup file structure

     BenReader/
     ├─ benreader.jar
     ├─ icons/
     │  ├─ add_book.png
     │  ├─ app_icon.ico
     │  ├─ app_icon.icns
     │  ├─ app_icon.png
     │  ├─ clean.png
     │  ├─ default_cover.png
     │  ├─ export_book.png
     │  ├─ generate_audio.png
     │  ├─ remove_book.png
     │  ├─ settings.png
     ├─ res/
     ├─ tts/
     │  ├─ bin/
     │  │  ├─ ffmpeg.exe    
     │  ├─ tts_epub (executable)

    The jar is the one you compiled in step 2, and the contents of the tts folder are the contents of the dist/tts_epub/ folder you compiled in step 4. With this, the program is done and you just need to run the jar. Internal program files will appear when you start using the program, like a config.json file. You will need to download the FFMPEG distributible for your operating system and insert it into the tts/bin folder as shown above.

  6. (Optional) Build as application with jpackage

    In the BenReader directory you created, run the following to create an installer

    • Windows:
        jpackage --input "." --name "BenReader" --main-jar "benreader.jar" --icon "icons/app_icon.ico" --win-per-user-install --type msi --win-shortcut --win-menu
    • MacOOS:
       jpackage -t "dmg" --app-version 1.0 --icon icons/app_icon.icns --name BenReader --verbose --input . --main-jar benreader.jar --mac-sign

(back to top)

Roadmap

  • Filter out invisible tags like <span> outside of <p> blocks
  • Incorporate other TTS models
  • Compile a version of the iOS app that has the Kokoro model built-in
  • Add support for importing other filetypes (would convert them to epub in the background)
    • pdf

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Acknowledgments

(back to top)

About

Local TTS Audiobook generation converting EPUB files to audiobooks, designed to work with an iOS App of the same name

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published