-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Large Chapter Save Recommendation #8
Comments
Ooo! Yeah sure long as this doesn't increase the ram requirements Your fix looks pretty straight forward tho, if I can find time to test it or if you give it the okay from your testing I'll slap that edit in |
Also I'll add it manually and add your name at my readme and the commit if I implement it. But if you open a pull request with your fix then we'll be able to get your name on the official GitHub contributors list for this repo :) |
testing your script modification in this space rn https://huggingface.co/spaces/drewThomasson/ebook2audiobookXTTS-testing-grounds-2?logs=build |
Tested and seems to be working will, to be implemented in the next big update with your credit added to the commit I'm turning all the scripts into one giant script that does everything lol and having them all work in offline docker lol |
…audio file combine method From this issue: #8 Their GitHub: https://github.com/shakenbake15
Implemented! Thank you for the help! |
Your chapter save method is non-optimal on books with large chapters. I would recommend that you consider changing the save method to combine the wav files. Currently, you're loading the "combined" file to add a smaller file. When your combined file starts to get large, this considerably slows down the process. loading a 1 min wav file to add 10 seconds is not a big deal, but when you are loading an hour long wav file to add 10 seconds, it can take a while to get to 2 hours or 3 hours. I hope that explanation makes sense. I would suggest that you set a batch limit of 256, then combine the batches for each chapter. This is a minor improvement, but it will speed things up when saving large chapter files.
This is how chat gpt recommends doing the update. Seems reasonable that this would work, but I'm using the program right now, so I can't test it at the moment.
def combine_wav_files(chapter_files, output_path, batch_size=256):
# Initialize an empty audio segment
combined_audio = AudioSegment.empty()
The text was updated successfully, but these errors were encountered: