From 4a7a984a5f3e3f894f86ce82e76ddd13d8a42a20 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期一, 11 三月 2024 17:56:30 +0800
Subject: [PATCH] Dev gzf (#1465)

---
 funasr/models/llm_asr/model.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/funasr/models/llm_asr/model.py b/funasr/models/llm_asr/model.py
index 3223190..f5dd3b1 100644
--- a/funasr/models/llm_asr/model.py
+++ b/funasr/models/llm_asr/model.py
@@ -218,7 +218,7 @@
     ):
         speech = speech.permute(0, 2, 1)
         res = self.audio_encoder(speech)
-        if len(res) > 1:
+        if isinstance(res, (list, tuple)):
             encoder_out, encoder_out_lens = res[0], res[1]
         else:
             encoder_out, encoder_out_lens = res, speech_lengths

--
Gitblit v1.9.1