From 835369d6315e96c1820326ed11ea4b999793720f Mon Sep 17 00:00:00 2001 From: 游雁 <zhifu.gzf@alibaba-inc.com> Date: 星期六, 13 一月 2024 22:42:18 +0800 Subject: [PATCH] funasr1.0 fix punc model --- funasr/download/download_from_hub.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/funasr/download/download_from_hub.py b/funasr/download/download_from_hub.py index 946572f..27bd79d 100644 --- a/funasr/download/download_from_hub.py +++ b/funasr/download/download_from_hub.py @@ -37,6 +37,8 @@ kwargs["model"] = cfg["model"] if os.path.exists(os.path.join(model_or_path, "am.mvn")): kwargs["frontend_conf"]["cmvn_file"] = os.path.join(model_or_path, "am.mvn") + if os.path.exists(os.path.join(model_or_path, "jieba_usr_dict")): + kwargs["jieba_usr_dict"] = os.path.join(model_or_path, "jieba_usr_dict") else:# configuration.json assert os.path.exists(os.path.join(model_or_path, "configuration.json")) with open(os.path.join(model_or_path, "configuration.json"), 'r', encoding='utf-8') as f: -- Gitblit v1.9.1