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: add repetition_penalty=1.3 to all vLLM services (fixes #2930 text repetition)
游雁793c45bfed74
diff --git a/examples/industrial_data_pretraining/fun_asr_nano/serve_vllm.py b/examples/industrial_data_pretraining/fun_asr_nano/serve_vllm.pyindex 1d4bd2db6..1820f9517 100644--- a/examples/industrial_data_pretraining/fun_asr_nano/serve_vllm.py+++ b/examples/industrial_data_pretraining/fun_asr_nano/serve_vllm.py@@ -107,7 +107,7 @@ def process_audio(audio_data, sr=16000, language=None, hotwords=None,return {"text": "", "segments": [], "duration": len(audio_data) / sr}# vLLM batch ASR- gen_kwargs = {"max_new_tokens": 500}+ gen_kwargs = {"max_new_tokens": 500, "repetition_penalty": 1.3}if language:gen_kwargs["language"] = languageif hotwords:diff --git a/funasr/bin/_server_app.py b/funasr/bin/_server_app.pyindex 03a659d9f..2b532cad8 100644--- a/funasr/bin/_server_app.py+++ b/funasr/bin/_server_app.py@@ -86,6 +86,7 @@ def create_app(device: str = "cuda", preload_model: str = "auto") -> FastAPI:kwargs = {"input": tmp_path, "batch_size": 1}if language:kwargs["language"] = language+ kwargs["repetition_penalty"] = 1.3result = asr.generate(**kwargs)text = re.sub(r'<\|[^|]*\|>', '', result[0]["text"]).strip()if response_format == "verbose_json":diff --git a/funasr/version.txt b/funasr/version.txtindex 80e78df68..95b25aee2 100644--- a/funasr/version.txt+++ b/funasr/version.txt@@ -1 +1 @@-1.3.5+1.3.6