From f046571ad63592c0b424e40a429e34182ca41357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stardust=C2=B7=E5=87=8F?= Date: Thu, 5 Oct 2023 11:28:33 +0800 Subject: [PATCH] fix hps --- bert_gen.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/bert_gen.py b/bert_gen.py index fb9b550f7..25cd7d97b 100644 --- a/bert_gen.py +++ b/bert_gen.py @@ -21,13 +21,12 @@ def process_line(line): word2ph = [i for i in word2ph] phone, tone, language = cleaned_text_to_sequence(phone, tone, language_str) - if hps.data.add_blank: - phone = commons.intersperse(phone, 0) - tone = commons.intersperse(tone, 0) - language = commons.intersperse(language, 0) - for i in range(len(word2ph)): - word2ph[i] = word2ph[i] * 2 - word2ph[0] += 1 + phone = commons.intersperse(phone, 0) + tone = commons.intersperse(tone, 0) + language = commons.intersperse(language, 0) + for i in range(len(word2ph)): + word2ph[i] = word2ph[i] * 2 + word2ph[0] += 1 bert_path = wav_path.replace(".wav", ".bert.pt")