p0n1 / epub_to_audiobook

EPUB to audiobook converter, optimized for Audiobookshelf
MIT License
1.16k stars 119 forks source link

[feat]: dotenv and multithreading #94

Open allen-n opened 2 weeks ago

allen-n commented 2 weeks ago

Adds support for reading env from a .env file, and adds multithreading to the azure tts provider to speed up throughput

p0n1 commented 2 weeks ago

Hi @allen-n. Thanks for contributing. I'll review and test this PR when I'm available. One quick question here: Is the conversion process stable and reliable when using multithreading to access Azure to accelerate TTS? Looking forward to your feedback from intensive testing.

allen-n commented 1 week ago

Hey @p0n1 - I've done quite a bit of single chapter at a time testing, but let me do a more thorough test of a larger swathe of a book and get some benchmarks on the speed-up and stability, I can ping back here once I've had a chance to do so!

allen-n commented 1 week ago

image This is the performance gain I'm seeing in larger scale testing, the google drive link below has a sheet with the specific stats and output audio files, which all sounded correct to me.

https://drive.google.com/drive/folders/16gBmNx41DpAlxxSC1txpiXBZmnqOleGh?usp=sharing

The compressed audiobook_output folder contains chapters from Harry Potter and the Methods of Rationality (a fan fic that isn't monetized). The google sheet specifies which chapters were created in the multi threaded vs single threaded environment. Sometimes I did both for a given chapter, which resulted in the suffix at the end of the file name.