From 691b38ed1138ca582468c52c634aa393fd0fa5b9 Mon Sep 17 00:00:00 2001 From: akgupta1337 Date: Sun, 7 Jan 2024 17:36:58 +0530 Subject: [PATCH 1/2] fix fairseq mode --- TTS/utils/manage.py | 1 + 1 file changed, 1 insertion(+) diff --git a/TTS/utils/manage.py b/TTS/utils/manage.py index 3a527f4609..a47f2cfa64 100644 --- a/TTS/utils/manage.py +++ b/TTS/utils/manage.py @@ -270,6 +270,7 @@ def _set_model_item(self, model_name): "description": "this model is released by Meta under Fairseq repo. Visit https://github.com/facebookresearch/fairseq/tree/main/examples/mms for more info.", } model_item["model_name"] = model_name + model_type, lang, dataset, model = model_name.split("/") elif "xtts" in model_name and len(model_name.split("/")) != 4: # loading xtts models with only model name (e.g. xtts_v2.0.2) # check model name has the version number with regex From b064a57b2b97f019b5d5ccac8456169654e35641 Mon Sep 17 00:00:00 2001 From: akgupta1337 Date: Sun, 7 Jan 2024 17:58:09 +0530 Subject: [PATCH 2/2] Added line to fix fairseq model issue and made code cleaner. --- TTS/utils/manage.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/TTS/utils/manage.py b/TTS/utils/manage.py index a47f2cfa64..6742ded8c2 100644 --- a/TTS/utils/manage.py +++ b/TTS/utils/manage.py @@ -260,8 +260,7 @@ def set_model_url(model_item: Dict): def _set_model_item(self, model_name): # fetch model info from the dict if "fairseq" in model_name: - model_type = "tts_models" - lang = model_name.split("/")[1] + model_type, lang, dataset, model = model_name.split("/") model_item = { "model_type": "tts_models", "license": "CC BY-NC 4.0", @@ -270,7 +269,6 @@ def _set_model_item(self, model_name): "description": "this model is released by Meta under Fairseq repo. Visit https://github.com/facebookresearch/fairseq/tree/main/examples/mms for more info.", } model_item["model_name"] = model_name - model_type, lang, dataset, model = model_name.split("/") elif "xtts" in model_name and len(model_name.split("/")) != 4: # loading xtts models with only model name (e.g. xtts_v2.0.2) # check model name has the version number with regex