code: def phoneme_to_sequence(
      text,
      cleaner_names,
      language,
      enable_eos_bos=False,
      tp=None,
      add_blank=False,
  ):
      # pylint: disable=global-statement
      global _phonemes_to_id, _phonemes
      if tp:
          _, _phonemes = make_symbols(**tp)
          _phonemes_to_id = {s: i for i, s in enumerate(_phonemes)}
  
      sequence = []
      clean_text = _clean_text(text, cleaner_names)
      to_phonemes = text2phone(clean_text, language)
      if to_phonemes is None:
          print(
              "!! After phoneme conversion the result is None. -- {} ".format(
                  clean_text
              )
          )
      # iterate by skipping empty strings - NOTE: might be useful to keep it to have a better intonation.
      for phoneme in filter(None, to_phonemes.split("|")):
          sequence += _phoneme_to_sequence(phoneme)
      # Append EOS char
      if enable_eos_bos:
          sequence = pad_with_eos_bos(sequence, tp=tp)
      if add_blank:
          sequence = intersperse(
              sequence, len(_phonemes)
          )  # add a blank token (new), whose id number is len(_phonemes)
      return sequence
  
file_path: TTS/TTS/tts/utils/text/__init__.py
imports: import re
  from packaging import version
  import phonemizer
  from phonemizer.phonemize import phonemize
  from TTS.tts.utils.text import cleaners
  from TTS.tts.utils.text.symbols import make_symbols, symbols, phonemes, _phoneme_punctuations, _bos, _eos
label_desc: Use image node_id 4 for calling a global function with example usage: phoneme_to_sequence(text, cleaner_names, language, enable_eos_bos, tp, add_blank) and returns: sequence