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:
|
# Sources:
|
||||||
# — https://github.com/AI-Guru/arxiv-reader
|
# — https://github.com/AI-Guru/arxiv-reader
|
||||||
@@ -32,7 +32,10 @@ with open(f"input.txt", "r") as f:
|
|||||||
for line in lines:
|
for line in lines:
|
||||||
line = line.replace("-", " - ")
|
line = line.replace("-", " - ")
|
||||||
line = line.replace("—", ". ")
|
line = line.replace("—", ". ")
|
||||||
|
line = line.replace(":", ". ")
|
||||||
line = line.replace(";", ". ")
|
line = line.replace(";", ". ")
|
||||||
|
line = line.replace("(", ". ")
|
||||||
|
line = line.replace(")", ". ")
|
||||||
for x in line.split(". "):
|
for x in line.split(". "):
|
||||||
# print(x)
|
# print(x)
|
||||||
sentences.append(x.strip())
|
sentences.append(x.strip())
|
||||||
|
|||||||
Reference in New Issue
Block a user