tts-service / assets /installation_checker.py
jlopez00's picture
Upload folder using huggingface_hub
92772e9 verified
raw
history blame
417 Bytes
from tts_service.utils import data_dir
from tts_service.voices import voice_manager
class InstallationError(Exception):
pass
def check_installation():
if not voice_manager.voice_names:
paths = ", ".join(str(p) for p in data_dir("voices").glob("*"))
raise InstallationError(f"No voice models found, voice dir contents: {paths}")
print(f"Voices: {', '.join(voice_manager.voice_names)}")