From 74f4f7b4c7228763fd923d2a27eb7d2515f89907 Mon Sep 17 00:00:00 2001
From: Shi Xian <40013335+R1ckShi@users.noreply.github.com>
Date: 星期五, 08 三月 2024 11:33:04 +0800
Subject: [PATCH] seaco with cifv2 (#1450)

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