From 654af12d8d73b4ff1504451e072be1297bbae0ca Mon Sep 17 00:00:00 2001
From: lyblsgo <wucong.lyb@alibaba-inc.com>
Date: 星期三, 11 十月 2023 19:48:17 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/main'
---
funasr/datasets/large_datasets/dataset.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/funasr/datasets/large_datasets/dataset.py b/funasr/datasets/large_datasets/dataset.py
index 6c166a5..adfe4f6 100644
--- a/funasr/datasets/large_datasets/dataset.py
+++ b/funasr/datasets/large_datasets/dataset.py
@@ -108,7 +108,7 @@
ark_reader = ReadHelper('ark:{}'.format(data_file))
reader_list.append(ark_reader)
elif data_type == "text" or data_type == "sound" or data_type == 'text_hotword':
- text_reader = open(data_file, "r")
+ text_reader = open(data_file, "r", encoding="utf-8")
reader_list.append(text_reader)
elif data_type == "none":
continue
@@ -205,7 +205,7 @@
# pre_prob = conf.get("pre_prob", 0) # unused yet
if pre_hwfile is not None:
pre_hwlist = []
- with open(pre_hwfile, 'r') as fin:
+ with open(pre_hwfile, 'r', encoding="utf-8") as fin:
for line in fin.readlines():
pre_hwlist.append(line.strip())
else:
--
Gitblit v1.9.1