mirror of
https://github.com/wassname/TTS.git
synced 2026-09-09 11:16:00 +08:00
refactoring tests after Coqpit
This commit is contained in:
@@ -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"),
|
||||
|
||||
Reference in New Issue
Block a user