Hotwords file needs to specify default utf-8 encoding. (#2379)

This commit is contained in:
辰冢 2025-02-12 16:13:08 +08:00 committed by GitHub
parent 001a66bbfe
commit 5052ca8bf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,7 +85,7 @@ async def record_microphone():
hotword_msg = ""
if args.hotword.strip() != "":
if os.path.exists(args.hotword):
f_scp = open(args.hotword)
f_scp = open(args.hotword, encoding="utf-8")
hot_lines = f_scp.readlines()
for line in hot_lines:
words = line.strip().split(" ")