espnet3.systems.esp2_codec.task.GANCodecTask
espnet3.systems.esp2_codec.task.GANCodecTask
class espnet3.systems.esp2_codec.task.GANCodecTask
Bases: AbsTask
GAN-based neural codec task.
classmethod add_task_arguments(parser: ArgumentParser)
Add codec-specific task arguments to the parser.
classmethod build_collate_fn(args: Namespace, train: bool) → Callable[[Collection[Tuple[str, Dict[str, ndarray]]]], Tuple[List[str], Dict[str, Tensor]]]
Build the collate function for codec batches.
classmethod build_model(args: Namespace) → ESPnetGANCodecModel
Build the ESPnet GAN codec model from parsed arguments.
classmethod build_optimizers(args: Namespace, model: ESPnetGANCodecModel) → List[Optimizer]
Build the generator and discriminator optimizers.
classmethod build_preprocess_fn(args: Namespace, train: bool) → Callable[[str, Dict[str, array]], Dict[str, ndarray]] | None
Build the preprocessing function for codec inputs.
class_choices_list : List[ClassChoices] = [<espnet2.train.class_choices.ClassChoices object>]
num_optimizers : int = 2
classmethod optional_data_names(train: bool = True, inference: bool = False) → Tuple[str, ...]
Return optional data field names for the task.
classmethod required_data_names(train: bool = True, inference: bool = False) → Tuple[str, ...]
Return required data field names for the task.
trainer
alias of GANTrainer
