Add tests

This commit is contained in:
Eren G??lge 2023-05-23 18:07:18 +02:00
parent 03b84600c6
commit f5a76959a7
2 changed files with 5 additions and 1 deletions

View File

@ -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)

View File

@ -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