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
Fix #2809: remove unnecessary GPU-to-CPU transfer in VAD ComputeScores (#2817)
Daniel Batesb6c29a647663
diff --git a/funasr/models/fsmn_vad_streaming/model.py b/funasr/models/fsmn_vad_streaming/model.pyindex 7dfb96a05..51581ba25 100644--- a/funasr/models/fsmn_vad_streaming/model.py+++ b/funasr/models/fsmn_vad_streaming/model.py@@ -348,7 +348,7 @@ class FsmnVADStreaming(nn.Module):def ComputeScores(self, feats: torch.Tensor, cache: dict = {}) -> None:- scores = self.encoder(feats, cache=cache["encoder"]).to("cpu") # return B * T * D+ scores = self.encoder(feats, cache=cache["encoder"]) # return B * T * Dassert (scores.shape[1] == feats.shape[1]), "The shape between feats and scores does not match"