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
update infer func for old contextual
shixian.shi5690a8bcb314
diff --git a/funasr/models/e2e_asr_paraformer.py b/funasr/models/e2e_asr_paraformer.pyindex 5a1a29be8..e157454e4 100644--- a/funasr/models/e2e_asr_paraformer.py+++ b/funasr/models/e2e_asr_paraformer.py@@ -2107,7 +2107,7 @@ class ContextualParaformer(Paraformer):return loss_att, acc_att, cer_att, wer_att, loss_pre- def cal_decoder_with_predictor(self, encoder_out, encoder_out_lens, sematic_embeds, ys_pad_lens, hw_list=None):+ def cal_decoder_with_predictor(self, encoder_out, encoder_out_lens, sematic_embeds, ys_pad_lens, hw_list=None, clas_scale=1.0):if hw_list is None:# default hotword listhw_list = [torch.Tensor([self.sos]).long().to(encoder_out.device)] # empty hotword list