Minor changes in handling of punctuation characters
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
# rm test.wav; python tts.py; play test.wav
|
||||
|
||||
# Sources:
|
||||
# — https://github.com/AI-Guru/arxiv-reader
|
||||
# — https://huggingface.co/facebook/fastspeech2-en-ljspeech
|
||||
# — https://github.com/AI-Guru/arxiv-reader
|
||||
|
||||
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
|
||||
from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
|
||||
import scipy
|
||||
import numpy as np
|
||||
import IPython.display as ipd
|
||||
import re
|
||||
|
||||
|
||||
models, cfg, task = load_model_ensemble_and_task_from_hf_hub(
|
||||
@@ -31,6 +30,7 @@ with open(f"input.txt", "r") as f:
|
||||
# Convert to sentences
|
||||
for line in lines:
|
||||
line = line.replace("-", " - ")
|
||||
line = line.replace("/", ", ")
|
||||
line = line.replace("—", ". ")
|
||||
line = line.replace(":", ". ")
|
||||
line = line.replace(";", ". ")
|
||||
|
||||
Reference in New Issue
Block a user