| | |
| | | import argparse |
| | | |
| | | from funasr.models.ctc import CTC |
| | | from funasr.utils import config_argparse |
| | | from funasr.utils.get_default_kwargs import get_default_kwargs |
| | | from funasr.utils.nested_dict_action import NestedDictAction |
| | | from funasr.utils.types import int_or_none |
| | |
| | | from funasr.utils.types import str_or_none |
| | | |
| | | |
| | | def build_args(args): |
| | | parser = argparse.ArgumentParser("Task related config") |
| | | def build_args(args, extra_task_params): |
| | | parser = config_argparse.ArgumentParser("Task related config") |
| | | if args.task_name == "asr": |
| | | from funasr.build_utils.build_asr_model import class_choices_list |
| | | for class_choices in class_choices_list: |
| | |
| | | else: |
| | | raise NotImplementedError("Not supported task: {}".format(args.task_name)) |
| | | |
| | | args = parser.parse_args() |
| | | return args |
| | | task_args = parser.parse_args(extra_task_params) |
| | | return task_args |