do not copy scale_stats if exist in the output folder

This commit is contained in:
Eren Gölge 2021-03-10 15:13:55 +01:00
parent 7782034e7e
commit 9e84c8a623
1 changed files with 2 additions and 1 deletions

View File

@ -75,4 +75,5 @@ def copy_model_files(c, config_file, out_path, new_fields):
# copy model stats file if available
if c.audio['stats_path'] is not None:
copy_stats_path = os.path.join(out_path, 'scale_stats.npy')
copyfile(c.audio['stats_path'], copy_stats_path)
if not os.path.exists(copy_stats_path):
copyfile(c.audio['stats_path'], copy_stats_path, )