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

Fix zh bug #3238

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Fix zh bug #3238

merged 1 commit into from
Nov 16, 2023

Conversation

WeberJulian
Copy link
Contributor

Using zh code is more fitting but we currently use zh-cn in the config and tokenzier, changing those file would trigger a re-download for everyone using v2. This fix should allow support for both codes.

@@ -396,7 +396,7 @@ def inference_with_config(self, text, config, ref_audio_path, language, **kwargs
inference with config
"""
assert (
language in self.config.languages
"zh-cn" if language == "zh" else language in self.config.languages
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will return "zh-cn" when language == "zh" and it will check if not. It is ok but for both conditional returns the same data type it should be True if language == "zh" else language in self.config.languages.

Copy link
Contributor

@Edresson Edresson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@erogol erogol merged commit fbc18b8 into dev Nov 16, 2023
52 of 53 checks passed
@erogol erogol deleted the fix_zh_bug branch November 16, 2023 16:51
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.

3 participants