Skip to content

Commit

Permalink
reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
魏宪豪 committed May 6, 2022
1 parent c504336 commit 931fd22
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion espnet2/text/phoneme_tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@ def pypinyin_g2p_phone(text) -> List[str]:
for p in [
get_initials(phone[0], strict=True),
# When using the new pypinyin, the previous code will drop the finals
get_finals(phone[0][:-1], strict=True) + phone[0][-1] if phone[0][-1].isdigit() else get_finals(phone[0], strict=True),
get_finals(phone[0][:-1], strict=True) + phone[0][-1]
if phone[0][-1].isdigit()
else get_finals(phone[0], strict=True),
]
# Remove the case of individual tones as a phoneme
if len(p) != 0 and not p.isdigit()
Expand Down

0 comments on commit 931fd22

Please sign in to comment.