From f5a76959a7df27f29ba52955c4110591a7290ba2 Mon Sep 17 00:00:00 2001 From: Eren G??lge Date: Tue, 23 May 2023 18:07:18 +0200 Subject: [PATCH] Add tests --- TTS/utils/manage.py | 2 +- tests/inference_tests/test_python_api.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/TTS/utils/manage.py b/TTS/utils/manage.py index 9136fcd3..275833ef 100644 --- a/TTS/utils/manage.py +++ b/TTS/utils/manage.py @@ -248,7 +248,7 @@ class ModelManager(object): def download_fairseq_model(self, model_name, output_path): URI_PREFIX = "coqui.gateway.scarf.sh/fairseq/" - model_type, lang, dataset, model = model_name.split("/") + _, lang, _, _ = model_name.split("/") model_download_uri = os.path.join(URI_PREFIX, f"{lang}.tar.gz") self._download_tar_file(model_download_uri, output_path, self.progress_bar) diff --git a/tests/inference_tests/test_python_api.py b/tests/inference_tests/test_python_api.py index f8ee4505..12cecd94 100644 --- a/tests/inference_tests/test_python_api.py +++ b/tests/inference_tests/test_python_api.py @@ -83,6 +83,10 @@ if is_coqui_available: wav = tts.tts(text="This is a test.", speed=2.0, emotion="Sad") self.assertGreater(len(wav), 0) + def test_fairseq_model(self): + tts = TTS(model_name="tts_models/eng/fairseq/vits") + tts.tts_to_file(text="This is a test.") + def test_multi_speaker_multi_lingual_model(self): tts = TTS() tts.load_tts_model_by_name(tts.models[0]) # YourTTS