Docs, if only one subdir skip generating style

This commit is contained in:
litagin02
2024-05-26 10:24:52 +09:00
parent ce26a0384d
commit d8ca829e28
2 changed files with 11 additions and 5 deletions

View File

@@ -50,8 +50,11 @@ def save_styles_by_dirs(wav_dir: Union[Path, str], output_dir: Union[Path, str])
subdirs = [d for d in wav_dir.iterdir() if d.is_dir()]
subdirs.sort()
if not subdirs:
logger.warning("No style directories found. Saving only neutral style.")
if len(subdirs) in (0, 1):
logger.info(
f"At least 2 subdirectories are required for generating style vectors with respect to them, found {len(subdirs)}."
)
logger.info("Generating only neutral style vector instead.")
save_neutral_vector(wav_dir, output_dir)
# First get mean of all for Neutral