Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Design Principles of PaddleSpeech pinyin lexicon #49

Closed
yt605155624 opened this issue Jun 24, 2022 · 1 comment
Closed

Design Principles of PaddleSpeech pinyin lexicon #49

yt605155624 opened this issue Jun 24, 2022 · 1 comment

Comments

@yt605155624
Copy link

yt605155624 commented Jun 24, 2022

g2p.md

So, if you want to use common G2P tools in text frontend such as pypinyin and g2pM, you should pay attention to the following rules:

for c, v in zip(orig_initials, orig_finals):
    if re.match(r'i\d', v):
        if c in ['z', 'c', 's']:
            v = re.sub('i', 'ii', v)
        elif c in ['zh', 'ch', 'sh', 'r']:
            v = re.sub('i', 'iii', v)

https://github.com/PaddlePaddle/PaddleSpeech/blob/0fa3fdb9ee89ca399b0f63ef2117c6370dc1f33d/paddlespeech/t2s/frontend/zh_frontend.py#L118

:)

@robin1001
Copy link
Contributor

That's very kind of you. Thanks a lot.

@pengzhendong pengzhendong pinned this issue Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants