diff --git a/tts.py b/tts.py index 4d597b4..df75175 100644 --- a/tts.py +++ b/tts.py @@ -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(";", ". ")