Skip to content

Commit

Permalink
fix a bug when preprocessing "?/!"
Browse files Browse the repository at this point in the history
  • Loading branch information
yerfor committed Sep 4, 2022
1 parent 5b07439 commit 110d821
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions data_gen/tts/txt_processors/zh.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ def process(cls, txt, pre_align_args):
if ph == '|' or ph == '#':
i += 1
continue
elif ph in [',', '.']:
# elif ph in [',', '.']:
elif ph in [',', '.', '?', '!']:
i += 1
txt_struct[i][1].append(ph)
i += 1
Expand All @@ -105,6 +106,7 @@ def process(cls, txt, pre_align_args):


if __name__ == '__main__':
t = 'simon演唱过后,simon还进行了simon精彩的文艺演出simon.'
# t = 'simon演唱过后,simon还进行了simon精彩的文艺演出simon.'
t = '你当我傻啊?脑子那么大怎么塞进去???'
phs, txt = TxtProcessor.process(t, {'use_tone': True})
print(phs, txt)

0 comments on commit 110d821

Please sign in to comment.