From 20ffa0e24131bfd502fc4b23e84ad3b3308af1c0 Mon Sep 17 00:00:00 2001
From: hnluo <haoneng.lhn@alibaba-inc.com>
Date: 星期三, 11 十月 2023 17:20:49 +0800
Subject: [PATCH] Merge pull request #1001 from alibaba-damo-academy/dev_lhn

---
 funasr/datasets/large_datasets/dataset.py |    4 ++--
 .github/workflows/main.yml                |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 9f3d9be..eec8f3d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -23,7 +23,7 @@
           pre-build-command: "pip install sphinx-markdown-tables nbsphinx jinja2 recommonmark sphinx_rtd_theme myst-parser"
 
       - name: deploy copy
-        if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev_wjm' || github.ref == 'refs/heads/dev_lyh'
+        if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev_wjm' || github.ref == 'refs/heads/dev_lyh' || github.ref == 'refs/heads/dev_lhn'
         run: |
           mkdir public
           touch public/.nojekyll
@@ -35,7 +35,7 @@
           cp -r docs/m2met2/_build/html/* public/m2met2/
 
       - name: deploy github.io pages
-        if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev_wjm' || github.ref == 'refs/heads/dev_lyh'
+        if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev_wjm' || github.ref == 'refs/heads/dev_lyh' || github.ref == 'refs/heads/dev_lhn'
         uses: peaceiris/actions-gh-pages@v2.3.1
         env:
           GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
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