Update cleaner.py

fix the return to phones, word2ph, norm_text
This commit is contained in:
lyris 2024-01-30 11:49:41 +08:00 committed by GitHub
parent e3b224f16a
commit 73520c3da1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -37,13 +37,13 @@ def clean_special(text, language, special_s, target_symbol):
norm_text = language_module.text_normalize(text)
phones = language_module.g2p(norm_text)
new_ph = []
for ph in phones:
for ph in phones[0]:
assert ph in symbols
if ph == ",":
new_ph.append(target_symbol)
else:
new_ph.append(ph)
return new_ph
return new_ph, phones[1], norm_text
def text_to_sequence(text, language):