From 37d7764ecf0e8cc1a14f59b8b9cd1c914da8b005 Mon Sep 17 00:00:00 2001
From: zhifu gao <zhifu.gzf@alibaba-inc.com>
Date: 星期日, 21 一月 2024 21:06:52 +0800
Subject: [PATCH] Funasr1.0 (#1277)

---
 funasr/frontends/wav_frontend.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/funasr/frontends/wav_frontend.py b/funasr/frontends/wav_frontend.py
index 9c896f1..c6e03e8 100644
--- a/funasr/frontends/wav_frontend.py
+++ b/funasr/frontends/wav_frontend.py
@@ -399,9 +399,10 @@
         return feats_pad, feats_lens, lfr_splice_frame_idxs
 
     def forward(
-        self, input: torch.Tensor, input_lengths: torch.Tensor, cache: dict = {}, **kwargs
+        self, input: torch.Tensor, input_lengths: torch.Tensor, **kwargs
     ):
         is_final = kwargs.get("is_final", False)
+        cache = kwargs.get("cache", {})
         if len(cache) == 0:
             self.init_cache(cache)
         

--
Gitblit v1.9.1