MCPcopy Create free account
hub / github.com/modelscope/FunASR / __init__

Method __init__

funasr/models/whisper_lid/model.py:31–162  ·  view source on GitHub ↗

Initialize OpenAIWhisperModel. Args: specaug: TODO. specaug_conf: Configuration dict for specaug. normalize: TODO. normalize_conf: Configuration dict for normalize. encoder: TODO. enc

(
        self,
        specaug: str = None,
        specaug_conf: dict = None,
        normalize: str = None,
        normalize_conf: dict = None,
        encoder: str = None,
        encoder_conf: dict = None,
        decoder: str = None,
        decoder_conf: dict = None,
        ctc: str = None,
        ctc_conf: dict = None,
        ctc_weight: float = 0.5,
        interctc_weight: float = 0.0,
        input_size: int = 80,
        vocab_size: int = -1,
        ignore_id: int = -1,
        blank_id: int = 0,
        sos: int = 1,
        eos: int = 2,
        lsm_weight: float = 0.0,
        length_normalized_loss: bool = False,
        report_cer: bool = True,
        report_wer: bool = True,
        sym_space: str = "<space>",
        sym_blank: str = "<blank>",
        # extract_feats_in_collect_stats: bool = True,
        share_embedding: bool = False,
        # preencoder: Optional[AbsPreEncoder] = None,
        # postencoder: Optional[AbsPostEncoder] = None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

29 """
30
31 def __init__(
32 self,
33 specaug: str = None,
34 specaug_conf: dict = None,
35 normalize: str = None,
36 normalize_conf: dict = None,
37 encoder: str = None,
38 encoder_conf: dict = None,
39 decoder: str = None,
40 decoder_conf: dict = None,
41 ctc: str = None,
42 ctc_conf: dict = None,
43 ctc_weight: float = 0.5,
44 interctc_weight: float = 0.0,
45 input_size: int = 80,
46 vocab_size: int = -1,
47 ignore_id: int = -1,
48 blank_id: int = 0,
49 sos: int = 1,
50 eos: int = 2,
51 lsm_weight: float = 0.0,
52 length_normalized_loss: bool = False,
53 report_cer: bool = True,
54 report_wer: bool = True,
55 sym_space: str = "<space>",
56 sym_blank: str = "<blank>",
57 # extract_feats_in_collect_stats: bool = True,
58 share_embedding: bool = False,
59 # preencoder: Optional[AbsPreEncoder] = None,
60 # postencoder: Optional[AbsPostEncoder] = None,
61 **kwargs,
62 ):
63
64 """Initialize OpenAIWhisperModel.
65
66 Args:
67 specaug: TODO.
68 specaug_conf: Configuration dict for specaug.
69 normalize: TODO.
70 normalize_conf: Configuration dict for normalize.
71 encoder: TODO.
72 encoder_conf: Configuration dict for encoder.
73 decoder: TODO.
74 decoder_conf: Configuration dict for decoder.
75 ctc: TODO.
76 ctc_conf: Configuration dict for ctc.
77 ctc_weight: TODO.
78 interctc_weight: TODO.
79 input_size: Size/dimension parameter.
80 vocab_size: Size/dimension parameter.
81 ignore_id: TODO.
82 blank_id: TODO.
83 sos: TODO.
84 eos: TODO.
85 lsm_weight: TODO.
86 length_normalized_loss: TODO.
87 report_cer: TODO.
88 report_wer: TODO.

Callers 1

__init__Method · 0.45

Calls 3

CTCClass · 0.90
LabelSmoothingLossClass · 0.90
output_sizeMethod · 0.45

Tested by

no test coverage detected