Skip to content

Commit

Permalink
Update __init__.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Stardust-minus authored Sep 23, 2023
1 parent d085f48 commit 855d5b8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion text/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,12 @@ def cleaned_text_to_sequence(cleaned_text, tones, language):
Returns:
List of integers corresponding to the symbols in the text
"""
phones = [_symbol_to_id[symbol] for symbol in cleaned_text]
phones = [] # _symbol_to_id[symbol] for symbol in cleaned_text
for symbol in cleaned_text:
try:
phones.append(_symbol_to_id[symbol])
except KeyError:
phones.append(0) # symbol not found in ID map, use 0('_') by default
tone_start = language_tone_start_map[language]
tones = [i + tone_start for i in tones]
lang_id = language_id_map[language]
Expand Down

0 comments on commit 855d5b8

Please sign in to comment.