From 9ba0dbd98bf69c830dfcfde8f109a400cb65e4e5 Mon Sep 17 00:00:00 2001
From: 雾聪 <wucong.lyb@alibaba-inc.com>
Date: 星期五, 29 三月 2024 17:24:59 +0800
Subject: [PATCH] fix func Forward
---
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