Skip to content

Commit

Permalink
fix .models.json and add testing to check released models availability
Browse files Browse the repository at this point in the history
  • Loading branch information
erogol committed Apr 29, 2021
1 parent fd95e9b commit f02f033
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
2 changes: 1 addition & 1 deletion TTS/.models.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"author": "Eren Gölge @erogol",
"license": "",
"contact":"[email protected]"
},
}
}
},
"es":{
Expand Down
20 changes: 20 additions & 0 deletions tests/model_manager.py
Original file line number Diff line number Diff line change
@@ -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)
20 changes: 0 additions & 20 deletions tests/test_model_manager.py

This file was deleted.

0 comments on commit f02f033

Please sign in to comment.