diff --git a/scripts/tts_mlx.py b/scripts/tts_mlx.py index 16352e9..ed828b5 100644 --- a/scripts/tts_mlx.py +++ b/scripts/tts_mlx.py @@ -131,7 +131,7 @@ def main(): print("Enter text to synthesize (Ctrl+D to end input):") text_to_tts = sys.stdin.read().strip() else: - with open(args.inp, "r") as fobj: + with open(args.inp, "r", encoding="utf-8") as fobj: text_to_tts = fobj.read().strip() all_entries = [tts_model.prepare_script([text_to_tts])] diff --git a/scripts/tts_pytorch.py b/scripts/tts_pytorch.py index fe08b99..58422e2 100644 --- a/scripts/tts_pytorch.py +++ b/scripts/tts_pytorch.py @@ -63,7 +63,7 @@ def main(): print("Enter text to synthesize (Ctrl+D to end input):") text = sys.stdin.read().strip() else: - with open(args.inp, "r") as fobj: + with open(args.inp, "r", encoding="utf-8") as fobj: text = fobj.read().strip() # If you want to make a dialog, you can pass more than one turn [text_speaker_1, text_speaker_2, text_2_speaker_1, ...]