From 753d579531e102e0c05358883af5d5ace02004e1 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期二, 05 三月 2024 17:58:35 +0800
Subject: [PATCH] Dev gzf (#1428)

---
 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