Skip to content

Commit

Permalink
Added line to fix fairseq model issue and made code cleaner.
Browse files Browse the repository at this point in the history
  • Loading branch information
akgupta1337 committed Jan 7, 2024
1 parent 691b38e commit b064a57
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions TTS/utils/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand Down

0 comments on commit b064a57

Please sign in to comment.