Traceback (most recent call last):
File "/Users/doc/repos/epub2tts/.venv/bin/epub2tts", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/doc/repos/epub2tts/.venv/lib/python3.11/site-packages/epub2tts.py", line 757, in main
mybook.read_book(
File "/Users/doc/repos/epub2tts/.venv/lib/python3.11/site-packages/epub2tts.py", line 534, in read_book
chunks = split_on_silence(
^^^^^^^^^^^^^^^^^
File "/Users/doc/repos/epub2tts/.venv/lib/python3.11/site-packages/pydub/silence.py", line 150, in split_on_silence
in detect_nonsilent(audio_segment, min_silence_len, silence_thresh, seek_step)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/doc/repos/epub2tts/.venv/lib/python3.11/site-packages/pydub/silence.py", line 86, in detect_nonsilent
silent_ranges = detect_silence(audio_segment, min_silence_len, silence_thresh, seek_step)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/doc/repos/epub2tts/.venv/lib/python3.11/site-packages/pydub/silence.py", line 19, in detect_silence
seg_len = len(audio_segment)
^^^^^^^^^^^^^^^^^^
TypeError: object of type 'int' has no len()
A text file with the attached contents fails during processing, mistakenly thinking there are 5 chapters to be read rather than three.
testing.txt
The error is: