aedocw / epub2tts

Turn an epub or text file into an audiobook
Apache License 2.0
445 stars 44 forks source link

Specifying --start 1 with --xtts throws an index error #109

Closed aedocw closed 7 months ago

aedocw commented 7 months ago
epub2tts mybook.epub --start 1 --end 3 --xtts speaker-1.wav --model adam
[...]
  File "/home/doc/repos/epub2tts/epub2tts.py", line 354, in read_book
    position += len(self.chapters_to_read[i])
IndexError: list index out of range

This did not happen when I did the same thing without the xtts options.

danielw97 commented 7 months ago

I'm not sure if this could have anything to do with it, although one thing I've noticed while testing the problematic branch is that the progress spoken so far text percentage is significantly reduced when using vits (I assume this is a side affect of removing silence). Not sure if this is having an affect on xtts, although this seems to work fine otherwise.

aedocw commented 7 months ago

This was resolved with the "more-bad-timing" branch. I was accidentally using the same index in two nested for loops.