mirror of https://github.com/coqui-ai/TTS.git
docstring update and better handling make_symbols
This commit is contained in:
parent
b735076bb4
commit
480e2f7888
|
@ -154,6 +154,7 @@ def text_to_sequence(text, cleaner_names, tp=None, add_blank=False):
|
|||
Args:
|
||||
text: string to convert to a sequence
|
||||
cleaner_names: names of the cleaner functions to run the text through
|
||||
tp: dictionary of character parameters to use a custom character set.
|
||||
|
||||
Returns:
|
||||
List of integers corresponding to the symbols in the text
|
||||
|
|
|
@ -11,7 +11,10 @@ def make_symbols(
|
|||
characters, phonemes=None, punctuations="!'(),-.:;? ", pad="_", eos="~", bos="^"
|
||||
): # pylint: disable=redefined-outer-name
|
||||
""" Function to create symbols and phonemes """
|
||||
_symbols = [pad, eos, bos] + list(characters)
|
||||
_symbols = list(characters)
|
||||
_symbols = [bos] + _symbols if len(bos) > 0 and bos is not None else _symbols
|
||||
_symbols = [eos] + _symbols if len(bos) > 0 and eos is not None else _symbols
|
||||
_symbols = [pad] + _symbols if len(bos) > 0 and pad is not None else _symbols
|
||||
_phonemes = None
|
||||
if phonemes is not None:
|
||||
_phonemes_sorted = sorted(list(set(phonemes)))
|
||||
|
|
Loading…
Reference in New Issue