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 paraformer finetune bug
北念d90de51e7609
diff --git a/funasr/bin/build_trainer.py b/funasr/bin/build_trainer.pyindex 61af7663d..bda83ec87 100644--- a/funasr/bin/build_trainer.py+++ b/funasr/bin/build_trainer.py@@ -548,7 +548,10 @@ def build_trainer(modelscope_dict,init_param = modelscope_dict['init_model']cmvn_file = modelscope_dict['cmvn_file']seg_dict_file = modelscope_dict['seg_dict']- bpemodel = modelscope_dict['bpemodel']+ if 'bpemodel' in modelscope_dict:+ bpemodel = modelscope_dict['bpemodel']+ else:+ bpemodel = None# overwrite parameterswith open(config) as f:@@ -582,7 +585,7 @@ def build_trainer(modelscope_dict,args.seg_dict_file = seg_dict_fileelse:args.seg_dict_file = None- if os.path.exists(bpemodel):+ if bpemodel is not None and os.path.exists(bpemodel):args.bpemodel = bpemodelelse:args.bpemodel = None