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/build_utils/build_model_from_file.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/funasr/build_utils/build_model_from_file.py b/funasr/build_utils/build_model_from_file.py
index 26542cd..65e0d5f 100644
--- a/funasr/build_utils/build_model_from_file.py
+++ b/funasr/build_utils/build_model_from_file.py
@@ -70,6 +70,8 @@
model.load_state_dict(model_dict)
else:
model_dict = torch.load(model_file, map_location=device)
+ if task_name == "ss":
+ model_dict = model_dict['model']
if task_name == "diar" and mode == "sond":
model_dict = fileter_model_dict(model_dict, model.state_dict())
if task_name == "vad":
--
Gitblit v1.9.1