From db33d0f610f7593ad1e61f8c3cc68de4a9b68f99 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期四, 12 十月 2023 13:05:26 +0800
Subject: [PATCH] Merge branch 'main' of https://github.com/alibaba-damo-academy/FunASR into 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