| | |
| | | from typing import Union |
| | | import logging |
| | | import torch |
| | | from typeguard import check_argument_types |
| | | |
| | | from funasr.modules.e2e_asr_common import ErrorCalculator |
| | | from funasr.modules.nets_utils import th_accuracy |
| | |
| | | import random |
| | | import math |
| | | |
| | | |
| | | class MFCCA(FunASRModel): |
| | | """ |
| | | Author: Audio, Speech and Language Processing Group (ASLP@NPU), Northwestern Polytechnical University |
| | |
| | | encoder: AbsEncoder, |
| | | decoder: AbsDecoder, |
| | | ctc: CTC, |
| | | rnnt_decoder: None, |
| | | rnnt_decoder: None = None, |
| | | ctc_weight: float = 0.5, |
| | | ignore_id: int = -1, |
| | | lsm_weight: float = 0.0, |
| | |
| | | sym_blank: str = "<blank>", |
| | | preencoder: Optional[AbsPreEncoder] = None, |
| | | ): |
| | | assert check_argument_types() |
| | | assert 0.0 <= ctc_weight <= 1.0, ctc_weight |
| | | assert rnnt_decoder is None, "Not implemented" |
| | | |