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

Ensure UTF-8 encoding for file reads to support Windows MaskGCT inference #408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sadler2
Copy link

@Sadler2 Sadler2 commented Mar 6, 2025

✨ Description

Before this fix, MaskGCT TTS produced unintelligible sounds instead of meaningful speech during inference on Windows. The issue was caused by reading JSON files without explicitly specifying UTF-8 encoding.

On systems where Python's default encoding is not set to UTF-8, this led to incorrect parsing of vocabulary/phoneme data, tampering the speech synthesis process.

before_and_after.zip

🚧 Related Issues

#327

https://github.com/justinjohn0306/MaskGCT-Windows

…ence

This patch explicitly sets `encoding="utf-8"` when reading JSON files to prevent encoding issues on Windows.
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.

1 participant