hanfish/LSai
0
1from text.symbols import *2 3 4_symbol_to_id = {s: i for i, s in enumerate(symbols)}5 6def cleaned_text_to_sequence(cleaned_text):7 '''Converts a string of text to a sequence of IDs corresponding to the symbols in the text.8 Args:9 text: string to convert to a sequence10 Returns:11 List of integers corresponding to the symbols in the text12 '''13 phones = [_symbol_to_id[symbol] for symbol in cleaned_text]14 return phones15 16 