Minor improvment in handling pauses
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user