From a89610a6e440bf48afb4b448081e69b03f65cc0f Mon Sep 17 00:00:00 2001 From: Plachtaa <112609742+Plachtaa@users.noreply.github.com> Date: Tue, 21 Feb 2023 17:21:57 +0800 Subject: [PATCH] Update preprocess.py --- preprocess.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/preprocess.py b/preprocess.py index 6d2649a..595cf73 100644 --- a/preprocess.py +++ b/preprocess.py @@ -29,7 +29,8 @@ if __name__ == "__main__": # custom character voices need to be at least equal to number of sample_audio4ft num_character_voices = len(custom_character_anno) cc_duplicate = num_old_voices // num_character_voices - cc_duplicate = 1 if num_character_voices >= num_old_voices else cc_duplicate + if cc_duplicate == 0: + cc_duplicate = 1 final_annos = final_annos + custom_character_anno * cc_duplicate # save annotation file with open("final_annotation_train.txt", 'w', encoding='utf-8') as f: