Skip to content

Commit

Permalink
Merge pull request #43 from aedocw/main
Browse files Browse the repository at this point in the history
merge to release to trigger docker container creation
  • Loading branch information
aedocw authored Sep 4, 2023
2 parents cb7f104 + 3290830 commit ae8f5f0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions epub2tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,18 +226,20 @@ def main():
for i in range(start, end):
outputwav = bookname.split(".")[0]+"-"+str(i+1)+".wav"
print("Reading " + str(i))
# Seems TTS can only output in wav? convert to m4b aftwarwards
tts.tts_to_file(text = chapters_to_read[i], speaker = speaker_used, file_path = outputwav)
if os.path.isfile(outputwav):
print(outputwav + " exists, skipping to next chapter")
continue
else:
tts.tts_to_file(text = chapters_to_read[i], speaker = speaker_used, file_path = outputwav)
files.append(outputwav)
position += len(chapters_to_read[i])
percentage = (position / total_chars) *100
print(f"{percentage:.2f}% spoken so far.\n")
print(f"{percentage:.2f}% spoken so far.")
elapsed_time = time.time() - start_time
chars_remaining = total_chars - position
estimated_total_time = elapsed_time / position * total_chars
estimated_time_remaining = estimated_total_time - elapsed_time
print(f"Elapsed time: {int(elapsed_time / 60)} minutes \n")
print(f"Estimated time to 100%: {int((estimated_time_remaining) / 60)} minutes \n")
print(f"Elapsed: {int(elapsed_time / 60)} minutes, ETA: {int((estimated_time_remaining) / 60)} minutes")


#Load all WAV files and concatenate into one object
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
author_email='doc@aedo.net',
url='https://github.com/aedocw/epub2tts',
license='Apache License, Version 2.0',
version='1.3.1',
version='1.3.2',
packages=find_packages(),
install_requires=requirements,
py_modules=['epub2tts'],
Expand Down

0 comments on commit ae8f5f0

Please sign in to comment.