mirror of https://github.com/coqui-ai/TTS.git
Added line to fix fairseq model issue and made code cleaner.
This commit is contained in:
parent
691b38ed11
commit
b064a57b2b
|
@ -260,8 +260,7 @@ class ModelManager(object):
|
||||||
def _set_model_item(self, model_name):
|
def _set_model_item(self, model_name):
|
||||||
# fetch model info from the dict
|
# fetch model info from the dict
|
||||||
if "fairseq" in model_name:
|
if "fairseq" in model_name:
|
||||||
model_type = "tts_models"
|
model_type, lang, dataset, model = model_name.split("/")
|
||||||
lang = model_name.split("/")[1]
|
|
||||||
model_item = {
|
model_item = {
|
||||||
"model_type": "tts_models",
|
"model_type": "tts_models",
|
||||||
"license": "CC BY-NC 4.0",
|
"license": "CC BY-NC 4.0",
|
||||||
|
@ -270,7 +269,6 @@ class ModelManager(object):
|
||||||
"description": "this model is released by Meta under Fairseq repo. Visit https://github.com/facebookresearch/fairseq/tree/main/examples/mms for more info.",
|
"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_item["model_name"] = model_name
|
||||||
model_type, lang, dataset, model = model_name.split("/")
|
|
||||||
elif "xtts" in model_name and len(model_name.split("/")) != 4:
|
elif "xtts" in model_name and len(model_name.split("/")) != 4:
|
||||||
# loading xtts models with only model name (e.g. xtts_v2.0.2)
|
# loading xtts models with only model name (e.g. xtts_v2.0.2)
|
||||||
# check model name has the version number with regex
|
# check model name has the version number with regex
|
||||||
|
|
Loading…
Reference in New Issue