Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
decoding
游雁b139b9cfaef2
diff --git a/funasr/models/sense_voice/decoder.py b/funasr/models/sense_voice/decoder.pyindex 19d9c1680..dd00ca869 100644--- a/funasr/models/sense_voice/decoder.py+++ b/funasr/models/sense_voice/decoder.py@@ -472,7 +472,7 @@ class ResidualAttentionBlockFSMN(nn.Module):is_pad_mask = kwargs.get("is_pad_mask", False)is_pad_memory_mask = kwargs.get("is_pad_memory_mask", False)- fsmn_cache = cache[layer]["fsmn_cache"] if len(cache) > 0 else None+ fsmn_cache = cache[layer]["fsmn_cache"] if len(cache) > 0 or cache is None else None# if fsmn_cache is not None:# x = x[:, -1:]att_res, fsmn_cache = self.attn(self.attn_ln(x), mask=None, cache=fsmn_cache)