From 2e36e738ca39afc8d02f3d11013bd12f937cc874 Mon Sep 17 00:00:00 2001
From: zhaomingwork <61895407+zhaomingwork@users.noreply.github.com>
Date: 星期三, 08 十一月 2023 09:22:06 +0800
Subject: [PATCH] fix bug for h5 hotwords (#1067)
---
funasr/bin/build_trainer.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/funasr/bin/build_trainer.py b/funasr/bin/build_trainer.py
index 52aa509..61af766 100644
--- a/funasr/bin/build_trainer.py
+++ b/funasr/bin/build_trainer.py
@@ -548,6 +548,7 @@
init_param = modelscope_dict['init_model']
cmvn_file = modelscope_dict['cmvn_file']
seg_dict_file = modelscope_dict['seg_dict']
+ bpemodel = modelscope_dict['bpemodel']
# overwrite parameters
with open(config) as f:
@@ -581,6 +582,10 @@
args.seg_dict_file = seg_dict_file
else:
args.seg_dict_file = None
+ if 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