From 810046e3df4910c8f5c1a90e4b53aca45b3397e8 Mon Sep 17 00:00:00 2001
From: wuhongsheng <664116298@qq.com>
Date: 星期一, 01 七月 2024 10:42:58 +0800
Subject: [PATCH] 优化merge segments 参数,解决新闻联播男女主持人“晚上好”合并一个speakid问题 (#1861)
---
funasr/download/download_from_hub.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/funasr/download/download_from_hub.py b/funasr/download/download_from_hub.py
index 46263c9..df4f33d 100644
--- a/funasr/download/download_from_hub.py
+++ b/funasr/download/download_from_hub.py
@@ -84,6 +84,14 @@
from funasr.utils.install_model_requirements import install_requirements
install_requirements(requirements)
+ if kwargs.get("trust_remote_code", False):
+ from funasr.utils.dynamic_import import import_module_from_path
+
+ model_code = kwargs.get("remote_code", "model")
+ import_module_from_path(model_code)
+
+ # from funasr.register import tables
+ # tables.print("model")
return kwargs
--
Gitblit v1.9.1