| | |
| | | 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: |
| | |
| | | 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 |
| | |
| | | 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: |