fix .models.json and add testing to check released models availability

This commit is contained in:
Eren Gölge 2021-04-29 09:32:36 +02:00
parent fd95e9b8a4
commit f02f0338c2
4 changed files with 21 additions and 22 deletions

View File

@ -39,7 +39,6 @@ jobs:
sudo apt install -y python3-wheel gcc
make system-deps
- name: Upgrade pip
# so we can take advantage of pyproject.toml build-dependency support
run: python3 -m pip install --upgrade pip
- name: Install TTS
run: |

View File

@ -69,7 +69,7 @@
"author": "Eren Gölge @erogol",
"license": "",
"contact":"egolge@coqui.com"
},
}
}
},
"es":{

20
tests/model_manager.py Normal file
View File

@ -0,0 +1,20 @@
#!/usr/bin/env python3`
import os
import shutil
import glob
from tests import get_tests_output_path
from TTS.utils.manage import ModelManager
def test_if_all_models_available():
"""Check if all the models are downloadable."""
print(" > Checking the availability of all the models under the ModelManager.")
manager = ModelManager(output_prefix=get_tests_output_path())
model_names = manager.list_models()
for model_name in model_names:
manager.download_model(model_name)
print(f" | > OK: {model_name}")
folders = glob.glob(os.path.join(manager.output_prefix, '*'))
assert len(folders) == len(model_names)
shutil.rmtree(manager.output_prefix)

View File

@ -1,20 +0,0 @@
# #!/usr/bin/env python3`
# import os
# import shutil
# import glob
# from tests import get_tests_output_path
# from TTS.utils.manage import ModelManager
# def test_if_all_models_available():
# """Check if all the models are downloadable."""
# print(" > Checking the availability of all the models under the ModelManager.")
# manager = ModelManager(output_prefix=get_tests_output_path())
# model_names = manager.list_models()
# for model_name in model_names:
# manager.download_model(model_name)
# print(f" | > OK: {model_name}")
# folders = glob.glob(os.path.join(manager.output_prefix, '*'))
# assert len(folders) == len(model_names)
# shutil.rmtree(manager.output_prefix)