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 transformerLM inference recipe
lzr2659469b4e0969f29d
diff --git a/egs/aishell2/transformerLM/run.sh b/egs/aishell2/transformerLM/run.shindex 4a647c9e3..b04c64396 100755--- a/egs/aishell2/transformerLM/run.sh+++ b/egs/aishell2/transformerLM/run.sh@@ -214,13 +214,15 @@ if [ ${stage} -le 3 ] && [ ${stop_stage} -ge 3 ]; thenecho "Stage 3: Calc perplexity: ${lm_test_text}"python ../../../funasr/bin/lm_inference_launch.py \- --output_dir "${lm_exp}/perplexity_test" \+ --output_dir "${lm_exp}/perplexity_test/output.1" \--ngpu "${gpu_num}" \--batch_size 1 \--train_config "${lm_exp}"/config.yaml \--model_file "${lm_exp}/${inference_lm}" \--data_path_and_name_and_type "${lm_test_text},text,text" \--num_workers 1 \+ --gpuid_list 0 \+ --mode "transformer" \--split_with_space falsefidiff --git a/funasr/bin/lm_inference_launch.py b/funasr/bin/lm_inference_launch.pyindex 236a923e7..f12f50a40 100644--- a/funasr/bin/lm_inference_launch.py+++ b/funasr/bin/lm_inference_launch.py@@ -183,6 +183,7 @@ def inference_lm(dtype=dtype,batch_size=batch_size,key_file=key_file,+ preprocess_fn=preprocessor,num_workers=num_workers,)