mirror of
https://github.com/wassname/TTS.git
synced 2026-10-27 12:30:27 +08:00
Use combined characters available in TTS phonemes (like ç)
This commit is contained in:
1 parent
da6f6a4a01
commit
618b509204
1 file changed
+5
@@ -53,6 +53,11 @@ def clean_gruut_phonemes(ph_list):
|
||||
cleaned_phonemes = []
|
||||
|
||||
for phoneme_text in ph_list:
|
||||
phoneme_text = unicodedata.normalize("NFC", phoneme_text)
|
||||
if phoneme_text in phonemes:
|
||||
cleaned_phonemes.append(phoneme_text)
|
||||
continue
|
||||
|
||||
# Decompose into codepoints (ã -> ["a", "\u0303"])
|
||||
phoneme_text = unicodedata.normalize("NFD", phoneme_text)
|
||||
for codepoint in phoneme_text.translate(GRUUT_TRANS_TABLE):
|
||||
|
||||
Reference in new issue
Block a user