Minor improvment in handling pauses

This commit is contained in:
Heiko J Schick
2022-08-30 10:55:16 +02:00
parent 6d842b4db3
commit 8f185975b6
+4 -1
View File
@@ -1,4 +1,4 @@
# rm test.wav; python TTS.py; play test.wav
# rm test.wav; python tts.py; play test.wav
# Sources:
# — https://github.com/AI-Guru/arxiv-reader
@@ -32,7 +32,10 @@ with open(f"input.txt", "r") as f:
for line in lines:
line = line.replace("-", " - ")
line = line.replace("", ". ")
line = line.replace(":", ". ")
line = line.replace(";", ". ")
line = line.replace("(", ". ")
line = line.replace(")", ". ")
for x in line.split(". "):
# print(x)
sentences.append(x.strip())