mirror of https://github.com/coqui-ai/TTS.git
commit
08bc758cad
TTS/utils
|
@ -317,14 +317,19 @@ class ModelManager(object):
|
||||||
else:
|
else:
|
||||||
os.makedirs(output_path, exist_ok=True)
|
os.makedirs(output_path, exist_ok=True)
|
||||||
print(f" > Downloading model to {output_path}")
|
print(f" > Downloading model to {output_path}")
|
||||||
if "fairseq" in model_name:
|
try:
|
||||||
self.download_fairseq_model(model_name, output_path)
|
if "fairseq" in model_name:
|
||||||
elif "github_rls_url" in model_item:
|
self.download_fairseq_model(model_name, output_path)
|
||||||
self._download_github_model(model_item, output_path)
|
elif "github_rls_url" in model_item:
|
||||||
elif "hf_url" in model_item:
|
self._download_github_model(model_item, output_path)
|
||||||
self._download_hf_model(model_item, output_path)
|
elif "hf_url" in model_item:
|
||||||
|
self._download_hf_model(model_item, output_path)
|
||||||
|
|
||||||
self.print_model_license(model_item=model_item)
|
except requests.Exception.RequestException as e:
|
||||||
|
print(f" > Failed to download the model file to {output_path}")
|
||||||
|
rmtree(output_path)
|
||||||
|
raise e
|
||||||
|
self.print_model_license(model_item=model_item)
|
||||||
# find downloaded files
|
# find downloaded files
|
||||||
output_model_path = output_path
|
output_model_path = output_path
|
||||||
output_config_path = None
|
output_config_path = None
|
||||||
|
|
Loading…
Reference in New Issue