diff --git a/TTS/tts/utils/text/__init__.py b/TTS/tts/utils/text/__init__.py index 64d15b01..1000b191 100644 --- a/TTS/tts/utils/text/__init__.py +++ b/TTS/tts/utils/text/__init__.py @@ -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 diff --git a/TTS/tts/utils/text/symbols.py b/TTS/tts/utils/text/symbols.py index a531849d..b48082b3 100644 --- a/TTS/tts/utils/text/symbols.py +++ b/TTS/tts/utils/text/symbols.py @@ -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)))