Update preprocess_text.py

This commit is contained in:
Stardust·减
2023-08-21 08:43:26 +08:00
committed by GitHub
parent 50655a7e3e
commit 28859ebe96

View File

@@ -17,8 +17,8 @@ if 1 in stage:
with open( transcription_path+'.cleaned', 'w', encoding='utf-8') as f:
for line in tqdm.tqdm(open(transcription_path, encoding='utf-8').readlines()):
try:
utt, spk, text = line.strip().split('|')
language = "ZH"
utt, spk, language, text = line.strip().split('|')
#language = "ZH"
norm_text, phones, tones, word2ph = clean_text(text, language)
f.write('{}|{}|{}|{}|{}|{}|{}\n'.format(utt, spk, language, norm_text, ' '.join(phones),
" ".join([str(i) for i in tones]),