fixed last chapter saved no TTS in audiobook
Browse files- audiobook.py +4 -1
audiobook.py
CHANGED
@@ -54,8 +54,11 @@ for vox in voices:
|
|
54 |
|
55 |
total = []
|
56 |
chapter = []
|
|
|
|
|
|
|
57 |
|
58 |
-
for para in d.paragraphs:
|
59 |
t = para.text
|
60 |
|
61 |
|
|
|
54 |
|
55 |
total = []
|
56 |
chapter = []
|
57 |
+
|
58 |
+
final_paragraph_for_saving_last_chapter = d.paragraphs[-1]
|
59 |
+
final_paragraph_for_saving_last_chapter.text = 'CHAPTER:'
|
60 |
|
61 |
+
for para in d.paragraphs + [final_paragraph_for_saving_last_chapter,]: # final paragraph is only to go into if & save .wav of last CHAPTER
|
62 |
t = para.text
|
63 |
|
64 |
|