mirror of https://github.com/coqui-ai/TTS.git
Update docstring for clean_gruut_phonemes
This commit is contained in:
parent
07e8ff193a
commit
da6f6a4a01
|
@ -34,13 +34,21 @@ GRUUT_TRANS_TABLE = str.maketrans("g", "ɡ")
|
||||||
def clean_gruut_phonemes(ph_list):
|
def clean_gruut_phonemes(ph_list):
|
||||||
"""Decompose, substitute, and clean gruut phonemes for TTS.
|
"""Decompose, substitute, and clean gruut phonemes for TTS.
|
||||||
|
|
||||||
Parameters:
|
gruut phonemes may contain any IPA characters (e.g., "ẽ" for the nasalized
|
||||||
ph_list (list[str]): list of phonemes from gruut
|
"e"), and may be composed of multiple characters (e.g., "aɪ" in the English
|
||||||
|
"r[i]ce").
|
||||||
|
|
||||||
|
TTS phonemes come from a fixed set of symbols, and do not include every
|
||||||
|
possible variation of every vowel/consonant. Here, we decompose dipthongs,
|
||||||
|
etc. into single characters and then filter out Unicode combining characters
|
||||||
|
such as ties. This ensures that (most) phonemes will exist in the TTS symbol
|
||||||
|
table.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
ph_list (list[str]): list of phonemes from gruut
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
clean_list (list[str]): decomposed/clean list of phonemes for TTS
|
clean_list (list[str]): decomposed/clean list of phonemes for TTS
|
||||||
Dipthongs, etc. are decomposed into single characters
|
|
||||||
Unicode combining characters are removed (e.g., ties)
|
|
||||||
"""
|
"""
|
||||||
cleaned_phonemes = []
|
cleaned_phonemes = []
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue