mirror of https://github.com/coqui-ai/TTS.git
Use combined characters available in TTS phonemes (like ç)
This commit is contained in:
parent
da6f6a4a01
commit
618b509204
|
@ -53,6 +53,11 @@ def clean_gruut_phonemes(ph_list):
|
||||||
cleaned_phonemes = []
|
cleaned_phonemes = []
|
||||||
|
|
||||||
for phoneme_text in ph_list:
|
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"])
|
# Decompose into codepoints (ã -> ["a", "\u0303"])
|
||||||
phoneme_text = unicodedata.normalize("NFD", phoneme_text)
|
phoneme_text = unicodedata.normalize("NFD", phoneme_text)
|
||||||
for codepoint in phoneme_text.translate(GRUUT_TRANS_TABLE):
|
for codepoint in phoneme_text.translate(GRUUT_TRANS_TABLE):
|
||||||
|
|
Loading…
Reference in New Issue