MCPcopy Create free account
hub / github.com/espnet/espnet / __init__

Method __init__

espnet2/train/preprocessor.py:642–732  ·  view source on GitHub ↗
(
        self,
        train: bool,
        use_lang_prompt: bool = False,
        use_nlp_prompt: bool = False,
        token_type: Optional[str] = None,
        token_list: Union[Path, str, Iterable[str]] = None,
        bpemodel: Union[Path, str, Iterable[str]] = None,
        text_cleaner: Collection[str] = None,
        g2p_type: Optional[str] = None,
        unk_symbol: str = "<unk>",
        space_symbol: str = "<space>",
        non_linguistic_symbols: Union[Path, str, Iterable[str]] = None,
        delimiter: Optional[str] = None,
        rir_scp: Optional[str] = None,
        rir_apply_prob: float = 1.0,
        noise_scp: Optional[str] = None,
        noise_apply_prob: float = 1.0,
        noise_db_range: str = "3_10",
        short_noise_thres: float = 0.5,
        aux_task_names: Collection[str] = None,
        speech_volume_normalize: float = None,
        speech_name: str = "speech",
        text_name: List[str] = ["text"],
        fs: int = 0,
        speaker_change_symbol: Iterable[str] = None,
        data_aug_effects: List = None,
        data_aug_num: List[int] = [1, 1],
        data_aug_prob: float = 0.0,
        # only use for whisper
        whisper_language: Optional[str] = None,
        whisper_task: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

640
641class CommonPreprocessor_multi(CommonPreprocessor):
642 def __init__(
643 self,
644 train: bool,
645 use_lang_prompt: bool = False,
646 use_nlp_prompt: bool = False,
647 token_type: Optional[str] = None,
648 token_list: Union[Path, str, Iterable[str]] = None,
649 bpemodel: Union[Path, str, Iterable[str]] = None,
650 text_cleaner: Collection[str] = None,
651 g2p_type: Optional[str] = None,
652 unk_symbol: str = "<unk>",
653 space_symbol: str = "<space>",
654 non_linguistic_symbols: Union[Path, str, Iterable[str]] = None,
655 delimiter: Optional[str] = None,
656 rir_scp: Optional[str] = None,
657 rir_apply_prob: float = 1.0,
658 noise_scp: Optional[str] = None,
659 noise_apply_prob: float = 1.0,
660 noise_db_range: str = "3_10",
661 short_noise_thres: float = 0.5,
662 aux_task_names: Collection[str] = None,
663 speech_volume_normalize: float = None,
664 speech_name: str = "speech",
665 text_name: List[str] = ["text"],
666 fs: int = 0,
667 speaker_change_symbol: Iterable[str] = None,
668 data_aug_effects: List = None,
669 data_aug_num: List[int] = [1, 1],
670 data_aug_prob: float = 0.0,
671 # only use for whisper
672 whisper_language: Optional[str] = None,
673 whisper_task: Optional[str] = None,
674 ):
675 super().__init__(
676 train=train,
677 token_type=token_type,
678 token_list=token_list,
679 bpemodel=bpemodel,
680 text_cleaner=text_cleaner,
681 g2p_type=g2p_type,
682 unk_symbol=unk_symbol,
683 space_symbol=space_symbol,
684 non_linguistic_symbols=non_linguistic_symbols,
685 delimiter=delimiter,
686 rir_scp=rir_scp,
687 rir_apply_prob=rir_apply_prob,
688 noise_scp=noise_scp,
689 noise_apply_prob=noise_apply_prob,
690 noise_db_range=noise_db_range,
691 short_noise_thres=short_noise_thres,
692 aux_task_names=aux_task_names,
693 speech_volume_normalize=speech_volume_normalize,
694 speech_name=speech_name,
695 fs=fs,
696 nonsplit_symbol=speaker_change_symbol,
697 data_aug_effects=data_aug_effects,
698 data_aug_num=data_aug_num,
699 data_aug_prob=data_aug_prob,

Callers

nothing calls this directly

Calls 3

__init__Method · 0.45

Tested by

no test coverage detected