def phoneme_to_sequence(text, cleaner_names, language, enable_eos_bos=False, tp=None):
    global _phonemes_to_id
    if tp:
        (_, _phonemes) = make_symbols(**tp)
        _phonemes_to_id = {s: i for (i, s) in enumerate(_phonemes)}
    sequence = []
    text = text.replace(':', '')
    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))
    for phoneme in filter(None, to_phonemes.split('|')):
        sequence += _phoneme_to_sequence(phoneme)
    if enable_eos_bos:
        sequence = pad_with_eos_bos(sequence, tp=tp)
    return sequence
def phoneme_to_sequence(text, cleaner_names, language, enable_eos_bos=False, tp=None):
    global _phonemes_to_id
    if tp:
        (_, _phonemes) = make_symbols(**tp)
        _phonemes_to_id = {s: i for (i, s) in enumerate(_phonemes)}
    sequence = []
    text = text.replace(':', )
    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))
    for phoneme in filter(None, to_phonemes.split('|')):
        sequence += _phoneme_to_sequence(phoneme)
    if enable_eos_bos:
        sequence = pad_with_eos_bos(sequence, tp=tp)
    return sequence