Update TextPreprocessor.py

This commit is contained in:
刘悦 2024-06-10 13:28:45 +08:00 committed by GitHub
parent a61f007060
commit 3c4f5462eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -57,6 +57,8 @@ class TextPreprocessor:
texts = self.pre_seg_text(text, lang, text_split_method)
result = []
print(i18n("############ 提取文本Bert特征 ############"))
with open('./srt/tts-out.txt', 'w', encoding='utf-8') as f:
f.write(str(texts))
for text in tqdm(texts):
phones, bert_features, norm_text = self.segment_and_extract_feature_for_text(text, lang)
if phones is None: