From 4ace5a95b052d338947fc88809a440ccd55cf6b4 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 16 十一月 2023 16:39:52 +0800
Subject: [PATCH] funasr pages

---
 funasr/bin/build_trainer.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/funasr/bin/build_trainer.py b/funasr/bin/build_trainer.py
index 52aa509..bda83ec 100644
--- a/funasr/bin/build_trainer.py
+++ b/funasr/bin/build_trainer.py
@@ -548,6 +548,10 @@
     init_param = modelscope_dict['init_model']
     cmvn_file = modelscope_dict['cmvn_file']
     seg_dict_file = modelscope_dict['seg_dict']
+    if 'bpemodel' in modelscope_dict:
+        bpemodel = modelscope_dict['bpemodel']
+    else:
+        bpemodel = None
 
     # overwrite parameters
     with open(config) as f:
@@ -581,6 +585,10 @@
         args.seg_dict_file = seg_dict_file
     else:
         args.seg_dict_file = None
+    if bpemodel is not None and os.path.exists(bpemodel):
+        args.bpemodel = bpemodel
+    else:
+        args.bpemodel = None
     args.data_dir = data_dir
     args.train_set = train_set
     args.dev_set = dev_set

--
Gitblit v1.9.1