From 341182c3bfc62831aa02781d0e6bbe2a479f3fb2 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期四, 07 三月 2024 10:03:02 +0800
Subject: [PATCH] Dev gzf (#1440)
---
funasr/auto/auto_model.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/funasr/auto/auto_model.py b/funasr/auto/auto_model.py
index 70d09df..9ae9f18 100644
--- a/funasr/auto/auto_model.py
+++ b/funasr/auto/auto_model.py
@@ -245,7 +245,10 @@
time1 = time.perf_counter()
with torch.no_grad():
- results, meta_data = model.inference(**batch, **kwargs)
+ res = model.inference(**batch, **kwargs)
+ if isinstance(res, (list, tuple)):
+ results = res[0]
+ meta_data = res[1] if len(res) > 1 else {}
time2 = time.perf_counter()
asr_result_list.extend(results)
--
Gitblit v1.9.1