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

Suggestion: Change file open method in generation.py (text2speech) #68

Open
smallbutfine opened this issue Apr 27, 2024 · 0 comments
Open

Comments

@smallbutfine
Copy link

line 492:
with open(file_path, encoding="utf-8", mode="r", errors='ignore') as f:

I added errors='ignore' because I had problems in batch conversion, when I used splitted files, that were written by a perl script, no matter what, even with explicit UTF-8 encoding, that always throw a decode error with "wrong start code". I had no problem with any other program reading these text files. Python still thinks, chars are malformed.
The addition prevent the error and made huge batches run thru. (book conversion)

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

1 participant