santinic /audiblez

Generate audiobooks from e-books

★ 8,881⑂ 773👁 43⑃ 47● 101▤ 0
PythonMITCreated 2025-01-14
More from this author
+0
Daily
8,881
stars
773
forks
43
watchers
47
prs
101
issues
0
releases

README

Audiblez: Generate  audiobooks from e-books



!PyPI - Python Version
!PyPI - Version

 v4 Now with Graphical interface, CUDA support, and many languages!

!Audiblez GUI on MacOSX

Audiblez generates .m4b audiobooks from regular .epub e-books,
using Kokoro's high-quality speech synthesis.

Kokoro-82M is a recently published text-to-speech model with just 82M params and very natural sounding output.
It's released under Apache licence and it was trained on < 100 hours of audio.
It currently supports these languages: 🇺🇸 🇬🇧 🇪🇸 🇫🇷 🇮🇳 🇮🇹 🇯🇵 🇧🇷 🇨🇳

On a Google Colab's T4 GPU via Cuda, it takes about 5 minutes to convert "Animal's Farm" by Orwell (which is about 160,000 characters) to audiobook, at a rate of about 600 characters per second.

On my M2 MacBook Pro, on CPU, it takes about 1 hour, at a rate of about 60 characters per second.


 How to install the Command Line tool

If you have Python 3 on your computer, you can install it with pip.
You also need espeak-ng and ffmpeg installed on your machine:

bash
sudo apt install ffmpeg espeak-ng                    on Ubuntu/Debian 🐧
pip install audiblez


bash
brew install ffmpeg espeak-ng                        on Mac 🍏
pip install audiblez


Then you can convert an .epub directly with:


audiblez book.epub -v af_sky


It will first create a bunch of book_chapter_1.wav, book_chapter_2.wav, etc. files in the same directory,
and at the end it will produce a book.m4b file with the whole book you can listen with VLC or any
audiobook player.
It will only produce the .m4b file if you have ffmpeg installed on your machine.

 How to run the GUI

The GUI is a simple graphical interface to use audiblez.
You need some extra dependencies to run the GUI:


sudo apt install ffmpeg espeak-ng 
sudo apt install libgtk-3-dev         just for Ubuntu/Debian 🐧, Windows/Mac don't need this
  
pip install audiblez pillow wxpython


Then you can run the GUI with:

audiblez-ui


 How to run on Windows

After many trials, on Windows we recommend to install audiblez in a Python venv:

1. Open a Windows terminal
2. Create anew folder: mkdir audiblez
3. Enter the folder: cd audiblez
4. Create a venv: python -m venv venv
5. Activate the venv: .\venv\Scripts\Activate.ps1
6. Install the dependencies: pip install audiblez pillow wxpython
7. Now you can run audiblez or audiblez-ui
8. For Cuda support, you need to install Pytorch accordingly: https://pytorch.org/get-started/locally/


 Speed

By default the audio is generated using a normal speed, but you can make it up to twice slower or faster by specifying a speed argument between 0.5 to 2.0:


audiblez book.epub -v af_sky -s 1.5


 Supported Voices

Use -v option to specify the voice to use. Available voices are listed here.
The first letter is the language code and the second is the gender of the speaker e.g. im_nicola is an italian male voice.

For hearing samples of Kokoro-82M voices, go here

| Language                  | Voices                                                     

Top issues

Discussions

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON