游雁
2023-11-16 4ace5a95b052d338947fc88809a440ccd55cf6b4
funasr/bin/build_trainer.py
@@ -548,6 +548,10 @@
    init_param = modelscope_dict['init_model']
    cmvn_file = modelscope_dict['cmvn_file']
    seg_dict_file = modelscope_dict['seg_dict']
    if 'bpemodel' in modelscope_dict:
        bpemodel = modelscope_dict['bpemodel']
    else:
        bpemodel = None
    # overwrite parameters
    with open(config) as f:
@@ -581,6 +585,10 @@
        args.seg_dict_file = seg_dict_file
    else:
        args.seg_dict_file = None
    if bpemodel is not None and os.path.exists(bpemodel):
        args.bpemodel = bpemodel
    else:
        args.bpemodel = None
    args.data_dir = data_dir
    args.train_set = train_set
    args.dev_set = dev_set
@@ -614,6 +622,7 @@
    if batch_bins is not None:
        if args.dataset_type == "small":
            args.batch_bins = batch_bins
            args.dataset_conf["batch_conf"]["batch_size"] = batch_bins
        elif args.dataset_type == "large":
            args.dataset_conf["batch_conf"]["batch_size"] = batch_bins
        else: