Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

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

辰冢5052ca8bf03c
diff --git a/runtime/python/websocket/funasr_wss_client.py b/runtime/python/websocket/funasr_wss_client.py
index d6e9eafb5..ed0cfc98f 100644
--- a/runtime/python/websocket/funasr_wss_client.py
+++ b/runtime/python/websocket/funasr_wss_client.py
@@ -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(" ")