espnet2.tasks.asr_transducer.ASRTransducerTask
espnet2.tasks.asr_transducer.ASRTransducerTask
class espnet2.tasks.asr_transducer.ASRTransducerTask
Bases: AbsTask
ASR Transducer Task definition.
classmethod add_task_arguments(parser: ArgumentParser)
Add Transducer task arguments.
- Parameters:
- cls – ASRTransducerTask object.
- parser – Transducer arguments parser.
classmethod build_collate_fn(args: Namespace, train: bool) → Callable[[Collection[Tuple[str, Dict[str, ndarray]]]], Tuple[List[str], Dict[str, Tensor]]]
Build collate function.
- Parameters:
- cls – ASRTransducerTask object.
- args – Task arguments.
- train – Training mode.
- Returns: Callable collate function.
classmethod build_model(args: Namespace) → ESPnetASRTransducerModel
Required data depending on task mode.
- Parameters:
- cls – ASRTransducerTask object.
- args – Task arguments.
- Returns: ASR Transducer model.
- Return type: model
classmethod build_preprocess_fn(args: Namespace, train: bool) → Callable[[str, Dict[str, array]], Dict[str, ndarray]] | None
Build pre-processing function.
- Parameters:
- cls – ASRTransducerTask object.
- args – Task arguments.
- train – Training mode.
- Returns: Callable pre-processing function.
class_choices_list : List[[ClassChoices](../train/ClassChoices.md#espnet2.train.class_choices.ClassChoices)] = [<espnet2.train.class_choices.ClassChoices object>, <espnet2.train.class_choices.ClassChoices object>, <espnet2.train.class_choices.ClassChoices object>, <espnet2.train.class_choices.ClassChoices object>]
num_optimizers : int = 1
classmethod optional_data_names(train: bool = True, inference: bool = False) → Tuple[str, ...]
Optional data depending on task mode.
- Parameters:
- cls – ASRTransducerTask object.
- train – Training mode.
- inference – Inference mode.
- Returns: Optional task data.
- Return type: retval
classmethod required_data_names(train: bool = True, inference: bool = False) → Tuple[str, ...]
Required data depending on task mode.
- Parameters:
- cls – ASRTransducerTask object.
- train – Training mode.
- inference – Inference mode.
- Returns: Required task data.
- Return type: retval
trainer
alias of Trainer