TheaterFire

Audiblez: Generate audiobooks from e-books with Kokoro-82M

Posted by inkompatible@reddit | LocalLLaMA | View on Reddit | 38 comments

Reply to Post

38 Comments

TruckUseful4423@reddit

GPU (CUDA) support would be nice :-) Thanks.
View on Reddit #45831862

inkompatible@reddit (OP)

it's coming
View on Reddit #45845851

TruckUseful4423@reddit

It uses CPU or GPU ?
View on Reddit #45737525

eggs-benedryl@reddit

Must be CPU, none of my GPU is being used. It's not THAT slow but it's taking a few hours for a shortish novel. Wish it was gpu based.
View on Reddit #45824427

eggs-benedryl@reddit

This is extremely cool. Likewise a gui would be helpful or at least a progress update periodically. For long books it's very hard to know how far along the status is. The long phonemes error or message had me wonder if it had stalled, though my PC was buzzing along with resources allocated so I just assumed. It does work for me which is cool as hell.
View on Reddit #45823273

GrepZen@reddit

**/u/inkompatible** YOU! are amazing! your use case exactly matches mine. I've just converted to dearly loved books into audiobooks after years of searching for them in any audio format. This has made my week. I really want to buy you a pint.
View on Reddit #45812717

newDell@reddit

Awesome!
View on Reddit #45809525

onewd@reddit

Works great! * Could it also work with .txt files? `pip install txt2epub` worked for me. * Could the "{title} by {author}" be optional? (add a `--no-title` command line flag?) * Could the ffmpeg m4b output be optional? I only need the .wav (`--no-m4b`?) * Could the ffmpeg path be configured? (`--ffmpeg=./ffmpeg`. Or documented that it must be in PATH) * Why is the example mixing en_gb and `-v a...`? Isn't the "a" for en_us?
View on Reddit #45764046

yegods666@reddit

I just copied the ffmpeg.exe into the python folder, and that worked fine
View on Reddit #45782335

onewd@reddit

I can make it work sure. This is feedback to make it better.
View on Reddit #45800796

maddogawl@reddit

This is such a great idea for a project. I need to dig through the source more, but currently i'm unable to get any epubs to actually convert. Also posted this on Github [https://github.com/santinic/audiblez/issues/1](https://github.com/santinic/audiblez/issues/1) My son legit asked me about something like this today.
View on Reddit #45740956

inkompatible@reddit (OP)

I fixed it in the new release v0.1.7, just pip install again. Thanks everyone
View on Reddit #45752292

maddogawl@reddit

Sweet I’ll try it again tonight
View on Reddit #45793671

duyntnet@reddit

I tried multiple epub files without success (I'm using Windows 10). Here's an output, the script couldn't find any text in the epub file: Dracula by Bram Stoker 6321841192133621355_345-h-0.htm.html 1960 - 6321841192133621355_345-h-1.htm.html 4039 - 6321841192133621355_345-h-2.htm.html 590 - 6321841192133621355_345-h-3.htm.html 31734 - 6321841192133621355_345-h-4.htm.html 29430 - 6321841192133621355_345-h-5.htm.html 30711 - 6321841192133621355_345-h-6.htm.html 31297 - 6321841192133621355_345-h-7.htm.html 19516 - 6321841192133621355_345-h-8.htm.html 30559 - 6321841192133621355_345-h-9.htm.html 31218 - 6321841192133621355_345-h-10.htm.html 34185 - 6321841192133621355_345-h-11.htm.html 32135 - 6321841192133621355_345-h-12.htm.html 32429 - 6321841192133621355_345-h-13.htm.html 28626 - 6321841192133621355_345-h-14.htm.html 39905 - 6321841192133621355_345-h-15.htm.html 35906 - 6321841192133621355_345-h-16.htm.html 34707 - 6321841192133621355_345-h-17.htm.html 31531 - 6321841192133621355_345-h-18.htm.html 24815 - 6321841192133621355_345-h-19.htm.html 30644 - 6321841192133621355_345-h-20.htm.html 37293 - 6321841192133621355_345-h-21.htm.html 30317 - 6321841192133621355_345-h-22.htm.html 33123 - 6321841192133621355_345-h-23.htm.html 33368 - 6321841192133621355_345-h-24.htm.html 29133 - 6321841192133621355_345-h-25.htm.html 30764 - 6321841192133621355_345-h-26.htm.html 33458 - 6321841192133621355_345-h-27.htm.html 34258 - 6321841192133621355_345-h-28.htm.html 38869 - 6321841192133621355_345-h-29.htm.html 40035 - 6321841192133621355_345-h-30.htm.html 4110 - 6321841192133621355_345-h-31.htm.html 19734 - wrap0000.html 146 - Found chapters: [] Started at: 16:13:44 Total characters: 0 Total words: 1 Converting to Mp4... Creating M4B file...
View on Reddit #45753898

inkompatible@reddit (OP)

Fixed, pip install again.
View on Reddit #45755432

duyntnet@reddit

It works now, thanks.
View on Reddit #45757660

inkompatible@reddit (OP)

Right, it doesn't recognize those chapters. Where did you find the epub? I will try to fix it
View on Reddit #45755153

duyntnet@reddit

All epub files I get them from [https://www.gutenberg.org/](https://www.gutenberg.org/)
View on Reddit #45757101

Ilforte@reddit

You didn't I think.
View on Reddit #45753446

yegods666@reddit

I found a solution, at least for me, and it's a pretty simple edit of the [audiblez.py](http://audiblez.py) file. Find the "Find\_Chapters" function in the file, and change it to something like this... "is\_chapter = lambda c: 'chapter' in c.get\_name().lower() or 'part' in c.get\_name().lower() or 'split' in c.get\_name().lower()". Since I noticed that most of my epub files use "split" in the internal filenames, I added that keyword to the list, and suddenly it all worked.
View on Reddit #45749954

GlowingPulsar@reddit

Just commenting to say I had the same issue as you. I was really excited to try this, too. Thanks for posting about the problem on the GitHub, I hope a solution comes from it
View on Reddit #45745179

remixer_dec@reddit

for non-realtime usecases there is no benifit in using such small models when there are others that provide better results
View on Reddit #45789144

zeldaleft@reddit

i need something that does this the other way around
View on Reddit #45778494

xyzoo2077@reddit

That is very cool. I would love to be able to process plain text files as well. It would allow for fun workflows. For example first create articles or book chapters summaries and then generate audio from them. I see this error in some cases : \[...\] \_\_init\_\_.py", line 152, in create audio = np.concatenate(audio) ValueError: need at least one array to concatenate I haven't looked into the code, but perhaps there are instances where epub sections have no content?
View on Reddit #45762577

inkompatible@reddit (OP)

Fixed in new release
View on Reddit #45771646

xyzoo2077@reddit

Works fine, thanks!
View on Reddit #45778315

Donnybonny22@reddit

What languages work ?
View on Reddit #45751275

johannoriel@reddit

only english so far
View on Reddit #45761567

Same-Chemical-780@reddit

**Supported Languages:** American English, British English (https://huggingface.co/hexgrad/Kokoro-82M)
View on Reddit #45759235

yegods666@reddit

it doesn't seem to work at all. tried it with several epubs, no joy.
View on Reddit #45746866

inkompatible@reddit (OP)

I fixed it in the new release v0.1.7, just pip install again. Thanks everyone
View on Reddit #45752300

inkompatible@reddit (OP)

Thanks! I'll do that
View on Reddit #45750013

ramzeez88@reddit

Works on windows?
View on Reddit #45744311

inkompatible@reddit (OP)

It should! Via Linux subsystem in windows
View on Reddit #45750046

bymihaj@reddit

Could be possible to create library of audiobook? With expired author right.
View on Reddit #45749651

rorowhat@reddit

It would be great to wrap this in a GUI.
View on Reddit #45736158

redditisunproductive@reddit

Quite useful, nice!
View on Reddit #45732429

Felladrin@reddit

Great idea! Thanks for sharing and making it open-source!
View on Reddit #45728276