refactoring tests after Coqpit

This commit is contained in:
Eren Gölge
2021-05-11 11:30:00 +02:00
parent 87384c6008
commit 5aee30443f
29 changed files with 156 additions and 153 deletions
+7 -3
View File
@@ -10,13 +10,17 @@ from tests import get_tests_input_path, get_tests_output_path
from TTS.tts.datasets import TTSDataset
from TTS.tts.datasets.preprocess import ljspeech
from TTS.utils.audio import AudioProcessor
from TTS.utils.io import load_config
from TTS.tts.configs import BaseTTSConfig
# pylint: disable=unused-variable
OUTPATH = os.path.join(get_tests_output_path(), "loader_tests/")
os.makedirs(OUTPATH, exist_ok=True)
c = load_config(os.path.join(get_tests_input_path(), "test_config.json"))
# create a dummy config for testing data loaders.
c = BaseTTSConfig(text_cleaner='english_cleaners', num_loader_workers=0, batch_size=2)
c.r = 5
c.data_path = "tests/data/ljspeech/"
ok_ljspeech = os.path.exists(c.data_path)
DATA_EXIST = True
@@ -40,7 +44,7 @@ class TestTTSDataset(unittest.TestCase):
compute_linear_spec=True,
ap=self.ap,
meta_data=items,
tp=c.characters if "characters" in c.keys() else None,
tp=c.characters,
batch_group_size=bgs,
min_seq_len=c.min_seq_len,
max_seq_len=float("inf"),