JarodMica / audiobook_maker

GNU General Public License v3.0
203 stars 34 forks source link

Export audiobook optimization / fix needed #51

Open shakenbake15 opened 2 months ago

shakenbake15 commented 2 months ago

Jared, I have noticed that your export audiobook accessed from the file menu has some issues. It is assembling wav files by appending each file to the previously assembled files. It loads the previously assembled file [ I think this is called combined_audio ] each time. This creates a problem when you are saving longer audiobook files. So a book that is say 6 hours will take a long time to save, but it will work. I was receiving errors on a 17 hour book that I was exporting that were crashing the application. Unless Chat GPT was wrong, wav files have a limit on size. The solution I implemented on my version of audiobook maker now saves by processing batches of around 256 wav files, saving, then resetting the variable combined_audio. Solves both the issue of taking way longer than it should and the file size issue. I then just use a different program to combine these smaller output files into an M4B file when I'm done. It's sort of like having randomly inserted 22 minute chapters.

I haven't uploaded these changes to my fork yet, but I'll do that at some point if that would help you to implement a similar solution.