From 3f40898dd1138fb5bc7b8ed6994d3845cd2319ef Mon Sep 17 00:00:00 2001 From: Plachta Date: Fri, 17 Feb 2023 10:21:34 +0800 Subject: [PATCH] upload files --- preprocess.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/preprocess.py b/preprocess.py index c543e98..d0cb6e5 100644 --- a/preprocess.py +++ b/preprocess.py @@ -25,10 +25,11 @@ if __name__ == "__main__": if os.path.exists("custom_character_anno.txt"): with open("custom_character_anno.txt", 'r', encoding='utf-8') as f: custom_character_anno = f.readlines() - # 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 - final_annos = final_annos + custom_character_anno * cc_duplicate + if len(custom_character_anno): + # 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 + final_annos = final_annos + custom_character_anno * cc_duplicate # save annotation file with open("final_annotation_train.txt", 'w', encoding='utf-8') as f: for line in final_annos: