mirror of
https://github.com/storytold/storyteller-ml.git
synced 2026-10-23 08:26:06 +00:00
Fix UnicodeDecodeError by specifying UTF-8 encoding when reading text files
This commit is contained in:
@@ -572,10 +572,10 @@ def main():
|
||||
|
||||
prompt_text = None
|
||||
if args.ref_text and os.path.exists(args.ref_text):
|
||||
with open(args.ref_text, 'r') as f:
|
||||
with open(args.ref_text, 'r', encoding='utf-8') as f:
|
||||
prompt_text = f.read().strip()
|
||||
|
||||
with open(args.target_text, 'r') as f:
|
||||
with open(args.target_text, 'r', encoding='utf-8') as f:
|
||||
target_text = f.read().strip()
|
||||
|
||||
output_path = gptsovits_inference(
|
||||
|
||||
Reference in New Issue
Block a user