MCPcopy Index your code
hub / github.com/modelscope/FunASR / __init__

Method __init__

funasr/models/llm_asr/model.py:406–559  ·  view source on GitHub ↗

Initialize LLMASR2. Args: specaug: TODO. specaug_conf: Configuration dict for specaug. normalize: TODO. normalize_conf: Configuration dict for normalize. audio_encoder: TODO. audio_en

(
        self,
        specaug: str = None,
        specaug_conf: dict = None,
        normalize: str = None,
        normalize_conf: dict = None,
        audio_encoder: str = None,
        audio_encoder_conf: dict = None,
        audio_adaptor: str = None,
        audio_adaptor_conf: dict = None,
        decoder: str = None,
        decoder_conf: dict = None,
        ctc: str = None,
        ctc_conf: dict = None,
        ctc_weight: float = 0.5,
        llm: str = None,
        llm_conf: dict = None,
        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

404 """ """
405
406 def __init__(
407 self,
408 specaug: str = None,
409 specaug_conf: dict = None,
410 normalize: str = None,
411 normalize_conf: dict = None,
412 audio_encoder: str = None,
413 audio_encoder_conf: dict = None,
414 audio_adaptor: str = None,
415 audio_adaptor_conf: dict = None,
416 decoder: str = None,
417 decoder_conf: dict = None,
418 ctc: str = None,
419 ctc_conf: dict = None,
420 ctc_weight: float = 0.5,
421 llm: str = None,
422 llm_conf: dict = None,
423 input_size: int = 80,
424 vocab_size: int = -1,
425 ignore_id: int = -1,
426 blank_id: int = 0,
427 sos: int = 1,
428 eos: int = 2,
429 lsm_weight: float = 0.0,
430 length_normalized_loss: bool = False,
431 report_cer: bool = True,
432 report_wer: bool = True,
433 sym_space: str = "<space>",
434 sym_blank: str = "<blank>",
435 # extract_feats_in_collect_stats: bool = True,
436 share_embedding: bool = False,
437 # preencoder: Optional[AbsPreEncoder] = None,
438 # postencoder: Optional[AbsPostEncoder] = None,
439 **kwargs,
440 ):
441
442 """Initialize LLMASR2.
443
444 Args:
445 specaug: TODO.
446 specaug_conf: Configuration dict for specaug.
447 normalize: TODO.
448 normalize_conf: Configuration dict for normalize.
449 audio_encoder: TODO.
450 audio_encoder_conf: Configuration dict for audio_encoder.
451 audio_adaptor: TODO.
452 audio_adaptor_conf: Configuration dict for audio_adaptor.
453 decoder: TODO.
454 decoder_conf: Configuration dict for decoder.
455 ctc: TODO.
456 ctc_conf: Configuration dict for ctc.
457 ctc_weight: TODO.
458 llm: TODO.
459 llm_conf: Configuration dict for llm.
460 input_size: Size/dimension parameter.
461 vocab_size: Size/dimension parameter.
462 ignore_id: TODO.
463 blank_id: TODO.

Callers

nothing calls this directly

Calls 7

AutoModelClass · 0.90
__init__Method · 0.45
output_sizeMethod · 0.45
searchMethod · 0.45
evalMethod · 0.45
from_pretrainedMethod · 0.45
load_state_dictMethod · 0.45

Tested by

no test coverage detected