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 |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/funasr/download/download_from_hub.py b/funasr/download/download_from_hub.py
index f1c01bd..df4f33d 100644
--- a/funasr/download/download_from_hub.py
+++ b/funasr/download/download_from_hub.py
@@ -85,8 +85,10 @@
 
         install_requirements(requirements)
     if kwargs.get("trust_remote_code", False):
+        from funasr.utils.dynamic_import import import_module_from_path
 
-        import model
+        model_code = kwargs.get("remote_code", "model")
+        import_module_from_path(model_code)
 
         # from funasr.register import tables
         # tables.print("model")

--
Gitblit v1.9.1