Closed Rihcus closed 8 months ago
So I found the sent_tokenize() function can occasionally give a blank output (I'm not sure why)
sentences = sent_tokenize(chapter_text, language='italian' if language == 'it' else 'english')
This causes issues around the loop in line 419 since if a blank fragment is put line 424 tts.tts_to_file will crash since no text is present to convert.
Solution (I think):
add a if fragment != "": under for fragment in fragments:
Disclamer I have very minimal python knowledge and this might not be the most elegant solution.
Made a pull request (first time making one)
I think I botched the request (wasn't sure if I need to keep a forked repo to make one)
hm, tried to figure out how to merge for 10 min, I can't seem to figure it out lol
But i'll create a new commit with you mentioned in the title with your changes added, sorry still new at this. :/
All I could find was a button to review your fork pull request??? idk man I'm confused lol
hm, tried to figure out how to merge for 10 min, I can't seem to figure it out lol
But i'll create a new commit with you mentioned in the title with your changes added, sorry still new at this. :/
All I could find was a button to review your fork pull request??? idk man I'm confused lol
So when making the edit I first forked the repo, made the edit and tried making a pull request (idk if I did it on the forked repo instead of main).
To make sure the pull was for the main repo I then tried going to your repo (the main one) and using the edit button:
and made a pull request.
I thought my fork would be redundant and decided to delete it which ended up with this:
TLDR: I somehow botched the pull quest process, but glad you were able to merge it :)
yeah no prob, THX FOR THE FIX!
Also testing your code made me realize that I should change the readme to better reflect how to use the program cause apparently at some point I made it so that you have to include all three parameters when calling the program
python ebook2audiobook.py <path_to_ebook_file> [path_to_voice_file] [language_code]
Idk why but if you don't include all of the parameters then it outputs a empty audio file
Hi I've been ancountering a strange error when trying to use the python script
Command used to run:
python ebook2audiobook.py "./sample.epub" "./4.wav" "en"
Book used Spice and wolf Volume 17
I have attached a zip of my working directory which contains a trimed version of the book, csv, and audio generated up to crash.
Regarding the bookt is 1 one page with crash area only, I removed all spoilers and altered the cover with calibre quick start cover
ebook2audiobookXTTS.zip
Any help would be greatly apreciated
Hardware: OS: macOS 14.2.1 23C71 arm64 Host: MacBookPro18,1 CPU: Apple M1 Pro GPU: Apple M1 Pro Memory: 2303MiB / 16384MiB