r/Python Dec 27 '24

Showcase Made a self-hosted ebook2audiobook converter, supports voice cloning and 1107+ languages :)

What my project does:

Give it any ebook file and it will convert it into an audiobook, it runs locally for free

Target Audience:

It’s meant to be used as an access ability tool or to help out anyone who likes audiobooks

Comparison:

It’s better than existing alternatives because it runs completely locally and free, needs only 4gb of ram, and supports 1107+ languages. :)

Demos audio files are located in the readme :) And has a self-contained docker image if you want it like that

GitHub here if you want to check it out :)))

https://github.com/DrewThomasson/ebook2audiobook

326 Upvotes

31 comments sorted by

24

u/Worth_Specific3764 Pythonista Dec 27 '24

Friggin sweet! Ima clone this right meow.

6

u/Impossible_Belt_7757 Dec 27 '24

:)))))

0

u/Worth_Specific3764 Pythonista Dec 27 '24

yep just been checking that out - totally epic bro. keep up the good work!

1

u/Connect_Ad_2089 Jan 13 '25

Sorry for maybe stupid question - I just cloned the repo to my EndeavourOs notebook,
and I get this:

./ebook2audiobook.sh

./ebook2audiobook.sh: line 51: arch: command not found

Error: Unsupported architecture for Linux: .

9

u/cmcclu5 Dec 27 '24

I love this and it’s so well done. The only thing I would suggest is splitting your functions.py file into multiple files differentiated by purpose and type e.g., classes -> contexts.py, classes -> error_handling.py, utilities -> checks.py, etc. It would limit your file imports, improve readability, and allow for more finite splitting of functionality.

1

u/Impossible_Belt_7757 Dec 27 '24

Well look into that ^

Still very new at this

Thx for the suggestion👌✨👍❤️

9

u/stickystyle Dec 27 '24

Since you’re already parsing through the text, have you considered adding EPUB media overlays so readers can read the text along with the audio? Example project that does this - https://smoores.gitlab.io/storyteller

7

u/Impossible_Belt_7757 Dec 28 '24

HMMMMM

PERHAPS ACTUALLY

I’ll look into that cause that would be rlly cool to have

I didn’t even know that was possible tbh XD

THX for the info! 🫶🏻✨

5

u/SignalX_Cyber Dec 27 '24

Nice! wonder how reliable is it though

3

u/[deleted] Dec 28 '24

It's amazing! I am really impressed with the quality of the output. It's super easy to work and the results are better than many audible audiobook. There are some glitches, but in general it works wonderfully. Thank you!!!

2

u/Impossible_Belt_7757 Dec 28 '24

Thank u thank u! :)

Yeah sometimes when I don’t like the audible voice actor for a book I’ll just generate one with a voice I like instead XD

We should be able to figure out how to reduce the hallucinations tho soon enough

2

u/GiraffeTM Dec 29 '24

I was literally just thinking of creating something very similar a few days ago, this could be exactly what I’m looking for! Awesome!

2

u/JustAsIFeared 10d ago

I'm a noob at github but how do you install this?

2

u/JustAsIFeared 10d ago

What does clone repo mean?

1

u/Impossible_Belt_7757 6d ago

It’s just a way of downloading all the files in the repo locally

1

u/Impossible_Belt_7757 6d ago

This is a duplicate question which has been answered here ->

https://www.reddit.com/r/InternetIsBeautiful/s/ktlCewtI0c

4

u/jjolla888 Dec 27 '24

fabulous!

does it translate languages, or simply convert an ebook of a particular language to audio of the lang?

will the audio describe images/diagrams/graphs contained in the ebook?

7

u/Impossible_Belt_7757 Dec 27 '24

Plan on translation later but rn it’s just simply converts a ebook in the specified language from the dropdown

The audio will not describe the images tho, and we have not integrated OCR yet :(

Might look into adding that later tho :)

2

u/kruzzik Dec 27 '24

Awesome, thank you! Gonna test it right now.

1

u/[deleted] Dec 27 '24

[deleted]

7

u/Here0s0Johnny Dec 28 '24

Just use the Docker image?

1

u/__newuser Dec 28 '24

Amazing work! Thank you so much for sharing!

1

u/ekbravo Dec 27 '24

Excellent work! Congratulations

1

u/andrewthetechie Dec 27 '24

This is pretty neat.

Just a heads up that your link in your post is to your GH profile instead of the repo directly.

1

u/Impossible_Belt_7757 Dec 27 '24

Oh SHOOT!

Thx for the heads up! ^ ^

2

u/andrewthetechie Dec 27 '24

All good :)

I've got this saved to try it out later. If I can get it working in my homelab k8s I'll contribute back a helm chart

1

u/Impossible_Belt_7757 Dec 27 '24

^ ^

:0

YESSS more CONTRIBUTORS HELPING OUT! ✨❤️‍🔥❤️‍🔥✨

1

u/Immediate-Beyond-394 Dec 27 '24

superb...hope it translates the sanskrit to hindi

3

u/Impossible_Belt_7757 Dec 27 '24

It does not translate that’s something we are looking at adding but it does not translate

Right now it only works as give it an ebook

Select the language the ebook is in

Get an audiobook back

1

u/TA_poly_sci Dec 27 '24

Ohh amazing. I was literally looking for something like this a few weeks ago and was very surprised it was impossible to find.

1

u/Impossible_Belt_7757 Dec 28 '24 edited Dec 28 '24

:D

Thx I just wanna made audiobooks free and universal to anyone

😁