Skip to content

Use pypinyin as a fallback for g2pw#205

Open
WhyNotHugo wants to merge 1 commit into
OHF-Voice:mainfrom
WhyNotHugo:pypinyin-fallback
Open

Use pypinyin as a fallback for g2pw#205
WhyNotHugo wants to merge 1 commit into
OHF-Voice:mainfrom
WhyNotHugo:pypinyin-fallback

Conversation

@WhyNotHugo

Copy link
Copy Markdown

g2pw transitively depends on pytorch, which is not available on all target environments where piper currently runs.

Use pypinyin as a fallback when g2pw is not available. Include a warning about this, since pypinyin might not be the preferred choice.

My handling of Chinese is very basic, but I asked a native speaker to compare the results of both, and they claim the it sounds the same, including intonation.

g2pw transitively depends on pytorch, which is not available on all
target environments where piper currently runs.

Use pypinyin as a fallback when g2pw is not available. Include a
warning about this, since pypinyin might not be the preferred choice.

My handling of Chinese is very basic, but I asked a native speaker to
compare the results of both, and they claim the it sounds the same,
including intonation.
@WhyNotHugo

Copy link
Copy Markdown
Author

v2: use logger.warning instead of logger.warn.

@synesthesiam synesthesiam self-assigned this Apr 7, 2026
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

Successfully merging this pull request may close these issues.

2 participants