Skip to main content

Convert Ebooks to Audiobooks with [custom] voice samples

Project description

Kenkui

Kenkui is basically a fancy wrapper for Kyutai's pocket-tts, with support for ebook parsing. It is multithreaded, and runs faster than any other tool I've used, so I figured I'd start a project to make it easier to use.

Features

  • Freaky fast audiobook generation
  • No GPU needed, 100% cpu
  • Super High Quality Text-to-Speech
  • State of the Art Tools
  • Multithreaded
  • Custom voices
  • Chapter selection
  • Batch processing

Requirements

  • python
  • pip, pipx, or uv
  • ffmpeg

Quick Start

Dependencies:

uv tool install kenkui
kenkui <your ebook name>.epub

You can also install using pip or pipx!

pip install kenkui

pipx install kenkui

Usage

You can pass a file or directory into kenkui, and it will search directories recursively for .epub files and convert them to m4b files.

Use --voice to specify the voice you want to use.

  • accepts:
    • the six default voices of pocket-tts (alba, marius, javert, jean, fantine, cosette, eponine, azelma)
    • .wav files locally on computer (kenkui ships with quite a few extra)
    • voices and safetensor files from hugging face (starts with hf://)

Use --list-voices to see all of the voices kenkui ships with.

Use --select-chapters and --select-books to specify which chapters or books you want to use.

[!NOTE] go to kyutai's official website to try the default voices out!

Custom voices

In order to use your own custom voice, make sure to record a 5-10 second clip of the person speaking, with minimal background noise or crosstalk. We highly recommend using some sort of tool to clean the audio.

Examples

kenkui book.epub
kenkui library/ --select-books --voice alba
kenkui book.epub -o output/ -j 4
kenkui book.epub --select-chapters --voice ~/Downloads/voice.wav

Notes

At this time we do not plan on supporting mp3, not because it's hard, but because m4b is a wonderful format. There is also currently not support for ebook formats other than epub. I'm sure it'll get added in the future.

For similar reasons, currently only pocket-tts is supported as the tts provider. It's the smallest, fastest, and most feature complete at the moment.

Special Thanks

Thank you to the Guttenberg Project for providing some books included in kenkui!

Roadmap

  • Add other models?
  • Make the debug menu useful
  • make --select chapters and select-books look as nice as list-voices
  • Add support for other pocket-tts features
    • temperature (expressiveness)
    • quality

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.4.0.tar.gz (59.5 kB view details)

Uploaded Source

Built Distribution

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

kenkui-0.4.0-py3-none-any.whl (46.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kenkui-0.4.0.tar.gz
  • Upload date:
  • Size: 59.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","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.4.0.tar.gz
Algorithm Hash digest
SHA256 62bbf7d1ad6a352085b6302ba79df305e02b14bf705f50de09af165e9a1aa132
MD5 7b1bc32716fcadf14e87212a545d52f9
BLAKE2b-256 715c7f931e79a14ff0f6e170faa4e001f64ecfa0fcb3e96720250b3d12cf4281

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kenkui-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 46.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 225a9b32ede2eee9a93588ffdaef0b897e4b0505bca73c6323485a336a15379b
MD5 36edfcd32c40f8247cb27cfee63131a0
BLAKE2b-256 ac7c3546133552680afbea258c390cf79243598cb23c45a8355c3521c8a71b93

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