Skip to main content

Convert Ebooks to Audiobooks with [custom] voice samples

Project description

kenkui

Python Platform License PyPI

Freaky fast audiobook generation from EPUBs. No GPU. No nonsense.

kenkui turns EPUB ebooks into high-quality M4B audiobooks using state-of-the-art text-to-speech — entirely on CPU, and faster than anything else I've used.

It's built on top of Kyutai's pocket-tts, with all the annoying parts handled for you: chapter parsing, batching, metadata, covers, voices, and sane defaults.

If you have ebooks and want audiobooks, kenkui is for you.


✨ Features

  • Freaky fast audiobook generation
  • No GPU needed, 100% CPU
  • Super high-quality text-to-speech
  • Multithreaded
  • EPUB-aware chapter parsing
  • Flexible chapter filtering with regex patterns and presets
  • Custom voices
  • Batch processing
  • Automatic cover embedding (EPUB → M4B)
  • Sensible defaults, minimal configuration

🚀 Quick Start

kenkui is intentionally easy to install and easy to use.

Requirements

Install

Recommended:

uv tool install kenkui

Alternatives if you prefer:

pip install kenkui
pipx install kenkui

Run

kenkui book.epub

That's it. You'll get a book.m4b alongside your EPUB.

You can also point Kenkui at a directory, and it will recursively convert all EPUBs it finds.


📚 Usage

You can pass either a single EPUB file or a directory.

# Convert a single book
kenkui book.epub

# Convert an entire library (interactive book selection)
kenkui library/

# Convert all books without prompting
kenkui library/ --no-select-books

# Specify output directory
kenkui book.epub -o output/

# Log detailed output to file
kenkui book.epub --log conversion.log

# Debug mode with full logging
kenkui book.epub --log debug.log --verbose

🎙️ Voice Selection

Use -v or --voice to choose a voice.

Accepted inputs:

  • One of pocket-tts's default voices:

    alba, marius, javert, jean, fantine, cosette, eponine, azelma
    
  • A local .wav file

  • A Hugging Face-hosted voice:

    hf://user/repo/voice.wav
    

To see everything Kenkui can currently use:

kenkui --list-voices

🎭 Custom Voices

To use your own voice, record a 5–10 second clip of clean speech with minimal background noise or crosstalk.

Cleaning the audio makes a noticeable difference. Tools like Adobe's Enhance Speech work well: https://podcast.adobe.com/en/enhance


FAQ

Do I need a GPU?
No. kenkui is 100% CPU-based.

Is it actually fast?
Yes. That's the entire point of the project.

What output format does it use?
M4B, with chapters, metadata, and embedded covers.

Can it generate MP3s?
No. This is intentional — M4B is a significantly better format for audiobooks.

Does it support formats other than EPUB?
Not currently. EPUB only, for now.

Why do I need to log in to Hugging Face for custom voices?
The pocket-tts model that powers kenkui is hosted on Hugging Face and is "gated," meaning the authors require users to accept their terms of use before downloading it. This is a one-time setup that takes about 2 minutes.

When you first use a custom voice (anything other than the 8 built-in defaults), kenkui will guide you through:

  1. Creating a free Hugging Face account (if you don't have one)
  2. Generating a read-only access token
  3. Accepting the model's terms of use

The process is interactive and will open your browser at the right pages. You only need to do this once.

Does it upload my books anywhere?
No. Everything runs locally. Internet access is only needed if you pull voices from Hugging Face.


Non-Goals

kenkui is not meant to be:

  • A general-purpose text-to-speech framework
  • A GUI application
  • An MP3 audiobook generator
  • A pluggable frontend for every TTS backend available

The focus is narrow by design: fast, high-quality audiobook generation from EPUBs, with minimal friction.


🙏 Special Thanks

Thanks to Project Gutenberg for providing some of the public-domain books included with Kenkui.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kenkui-0.6.1.tar.gz (83.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kenkui-0.6.1-py3-none-any.whl (83.4 MB view details)

Uploaded Python 3

File details

Details for the file kenkui-0.6.1.tar.gz.

File metadata

  • Download URL: kenkui-0.6.1.tar.gz
  • Upload date:
  • Size: 83.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kenkui-0.6.1.tar.gz
Algorithm Hash digest
SHA256 b7a9e081ea501a0c6b72409baf538a33c8ae39e23eaa0d32cff80246fb4b89ed
MD5 bf833c170a716bb450208541463a7678
BLAKE2b-256 9ef757cfd7ad1711085f6b18ffaac1d0bbe5a14dbf51084db2a769ade60ac604

See more details on using hashes here.

File details

Details for the file kenkui-0.6.1-py3-none-any.whl.

File metadata

  • Download URL: kenkui-0.6.1-py3-none-any.whl
  • Upload date:
  • Size: 83.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kenkui-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9cea029eaf59a3ff0d0b00d71e3cacde7233bafa5cf832f6fbd9c75c3a08a0d0
MD5 046e59a71f5e1b35b5979b98c2272496
BLAKE2b-256 5050d8abe5ac0e5c4415c4fbad7409f26b653ad880f4c8220592680c595c0ddc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page