Removed IPython package

This commit is contained in:
Heiko J Schick
2022-09-07 15:47:47 +02:00
parent a6b1377ed2
commit 454faf934b
2 changed files with 11 additions and 10 deletions
+1 -1
View File
@@ -21,10 +21,10 @@ $(VENV_NAME)/bin/activate:
${PYTHON} -m pip install -U pip ${PYTHON} -m pip install -U pip
${PYTHON} -m pip install fairseq ${PYTHON} -m pip install fairseq
${PYTHON} -m pip install scipy ${PYTHON} -m pip install scipy
${PYTHON} -m pip install IPython
${PYTHON} -m pip install huggingface_hub ${PYTHON} -m pip install huggingface_hub
${PYTHON} -m pip install tensorboardX ${PYTHON} -m pip install tensorboardX
${PYTHON} -m pip install g2p_en ${PYTHON} -m pip install g2p_en
${PYTHON} -m pip install pylint
touch $(VENV_NAME)/bin/activate touch $(VENV_NAME)/bin/activate
tts: env tts: env
+8 -7
View File
@@ -1,15 +1,16 @@
# rm test.wav; python tts.py; play test.wav
# Sources: """
# — https://huggingface.co/facebook/fastspeech2-en-ljspeech Text-to-speech synthesis (TTS)
# — https://github.com/AI-Guru/arxiv-reader
Sources:
— https://huggingface.co/facebook/fastspeech2-en-ljspeech
— https://github.com/AI-Guru/arxiv-reader
"""
import argparse import argparse
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub
from fairseq.models.text_to_speech.hub_interface import TTSHubInterface from fairseq.models.text_to_speech.hub_interface import TTSHubInterface
import scipy import scipy
import numpy as np import numpy as np
import IPython.display as ipd
def main(): def main():
""" """
@@ -35,7 +36,7 @@ def main():
sentences = [] sentences = []
# Read input file # Read input file
with open(args['input'], "r") as f: with open(args['input'], "r", encoding="utf-8") as f:
lines = f.readlines() lines = f.readlines()
# Convert to sentences # Convert to sentences
@@ -65,7 +66,7 @@ def main():
line = line.replace(";", ". ") line = line.replace(";", ". ")
line = line.replace("?", "?. ") line = line.replace("?", "?. ")
line = line.replace("(", ". ") line = line.replace("(", ". ")
# line = line.replace(")", ". ") # TODO: Check immune system article
for x in line.split(". "): for x in line.split(". "):
sentences.append(x.strip()) sentences.append(x.strip())
sentences.append("<PAUSE>") sentences.append("<PAUSE>")