§
    @Äj¼ ã            	       óö  — d dl mZ d dlmZmZmZmZ d dlmZ ddl	m
Z
mZ g Ze G d„ d¦  «        ¦   «         Ze G d„ d	e¦  «        ¦   «         Z ed
i dd“dg d¢“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd “d!d“d"d“d#d$“d%d&“d'dd(¬)¦  «        Zd*e_         ed+i dd“dg d¢“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd “d!d“d"d“d#d$“d%d,“ ej        ¦   «         d'dd(¬-¦  «        Zd.e_         ed/i dd“dg d¢“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd “d!d“d"d“d#d$“d%d,“ ej        ¦   «         d'dd(¬0¦  «        Zd1e_         ed2i dd“dg d¢“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd “d!d“d"d“d#d$“d%d,“ ej        ¦   «         d'dd(¬0¦  «        Zd3e_         ed4i dd“dg d¢“dd“dd5“dd“dd“dd“dd6“dd“dd“dd7“dd “d!d “d"d“d#d8“d%d&“d'dd(¬9¦  «        Zd:e_         ed;i dd“dg d¢“dd“dd5“dd“dd“dd“dd6“dd“dd“dd7“dd “d!d “d"d“d#d8“d%d,“ ej        ¦   «         d'dd(¬0¦  «        Zd<e_         ed=i dd“dg d¢“dd“dd5“dd“dd“dd“dd6“dd“dd“dd7“dd “d!d “d"d“d#d8“d%d,“ ej        ¦   «         d'dd(¬0¦  «        Zd>e_         ed?i dd“dg d¢“dd“dd5“dd“dd“dd“dd6“dd“dd“dd7“dd “d!d “d"d“d#d8“d%d,“ ej        ¦   «         d'dd(¬0¦  «        Zd@e_         edAi ddB“dg d¢“ddC“dd5“dd“dd“dd“dd6“dd“dd“dd7“dd “d!d “d"dC“d#d “d%d&“d'dCd(¬9¦  «        ZdDe_         edEi ddB“dg d¢“ddC“dd5“dd“dd“dd“dd6“dd“dd“dd7“dd “d!d “d"dC“d#d “d%d,“ ej        ¦   «         d'dCd(¬0¦  «        ZdFe_         edGi ddB“dg d¢“ddC“dd5“dd“dd“dd“dd6“dd“dd“dd7“dd “d!d “d"dC“d#d “d%d,“ ej        ¦   «         d'dCd(¬0¦  «        ZdHe_         edIi ddB“dg d¢“ddC“dd5“dd“dd“dd“dd6“dd“dd“dd7“dd “d!d “d"dC“d#d “d%d,“ ej        ¦   «         d'dCd(¬0¦  «        ZdJe_         edKi ddB“dg d¢“ddC“dd5“dd “dd“dd“dd6“dd“dd “dd7“dd “d!d “d"dC“d#d “d%d&“d'dCd(¬9¦  «        ZdLe_         edMi dd“dg d¢“dd“dd“dd“dd“dd“dd“dd“dd“dd“dd “d!d“d"d“d#d$“d%d&“d'dd(¬9¦  «        ZdNe_         edOi ddB“dg d¢“dd“dd5“dd “dd“dd“dd6“dd“dd “dd7“dd “d!d “d"dC“d#d “d%d&“d'dCd(¬9¦  «        ZdPe_         edQi ddB“dg d¢“dd“ddR“dd “dd“dd“ddS“dd“dd “ddT“dd “d!d “d"dC“d#d “d%d&“d'dCd(¬9¦  «        Z dUe _         edVi ddB“dg d¢“dd“dd5“dd “dd“dd“dd6“dd“dd “dd7“dd“d!d “d"dC“d#d“d%d,“ ej        ¦   «         d'dCd(¬0¦  «        Z!dWe!_         edXi ddB“dg d¢“dd“ddR“dd “dd“dd“ddS“dd“dd “ddT“dd“d!d “d"dC“d#d“d%d,“ ej        ¦   «         d'dCd(¬0¦  «        Z"dYe"_         edZi dd“dg d¢“dd“dd“dd “dd“dd“dd“dd“dd “dd“dd“d!d “d"d“d#d“d%d[“ ej#        ¦   «         d'dd\d(¬]¦  «        Z$d^e$_         ed_i dd“dg d¢“dd“dd“dd “dd“dd“dd“dd“dd “dd“dd“d!d “d"d“d#d“d%d`“ ej%        ¦   «         d'ddad(¬]¦  «        Z&dbe&_         edci dd“dg d¢“dd“dd“dd “dd“dd“dd“dd“dd “dd“dd“d!d “d"d“d#d“d%dd“ ej'        ¦   «         d'dd\d(¬]¦  «        Z(dee(_         edfi dd“dg d¢“dd“dd“dd “dd“dd“dd“dd“dd “dd“dd“d!d “d"d“d#d“d%dg“ ej)        ¦   «         d'dd(¬0¦  «        Z*dhe*_         edii dd“dg d¢“dd“dd“dd “dd“dd“dd“dd“dd “dd“dd“d!d “d"d“d#d“d%dj“ ej+        ¦   «         d'ddkd(¬]¦  «        Z,dle,_         edmi dd“dg d¢“dd“dd“dd“dd“dd“dd“dd“dndo“dpdq“dd“dd“dd “d!d“d"d“d#d$“d%d&i¥drd'd¬s¦  «        Z-dte-_         edui dd“dg d¢“dd“dd“dd“dd“dd“dd“dd“dndo“dpdq“dd“dd“dd “d!d“d"d“d#d$“d%d&i¥drd'd¬s¦  «        Z.dve._         edwi ddB“dg d¢“dd“dd5“dd“dd“dd“dd6“dd“dndo“dpdq“dd“dd7“dd “d!d“d"dC“d#d$“d%d&i¥drd'dC¬s¦  «        Z/dxe/_         edyi ddB“dg d¢“ddC“dd5“dd “dd“dd“dd6“dd“dd “dd7“dd “d!d “d"dC“d#d “d%d&“d(d'dC¬s¦  «        Z0dze0_         ed{i ddB“dg d¢“ddC“ddR“dd“dd“dd“ddS“dd“dd “ddT“dd “d!d “d"dC“d#d “d%d&“d(d'dC¬s¦  «        Z1d|e1_         ed}i ddB“dg d¢“ddC“dd~“dd“dd“dd“ddS“dd“dd “dd“dd “d!d “d"dC“d#d “d%d&“d(d'dC¬s¦  «        Z2d€e2_        e G d�„ d‚e¦  «        ¦   «         Z3 e3dƒi ddB“dg d¢“ddC“dd5“dd “dd“dd“dd6“dd“dd “dd7“dd“d!d “d"dC“d#d“d%d`“ ej4        ¦   «         d'dCd(¬0¦  «        Z5d„e5_        d&S )…é    )Ú	dataclass)ÚAnyÚDictÚOptionalÚTuple)ÚModuleé   )ÚalignerÚutilsc                   óŠ   — e Zd ZU dZeed<   eeef         ed<   eed<   e	ed<   eed<   e
defd„¦   «         Zd	„ Zd
dœdefd„Zd
S )ÚWav2Vec2BundleuÜ  Data class that bundles associated information to use pretrained :py:class:`~torchaudio.models.Wav2Vec2Model`.

    This class provides interfaces for instantiating the pretrained model along with
    the information necessary to retrieve pretrained weights and additional data
    to be used with the model.

    Torchaudio library instantiates objects of this class, each of which represents
    a different pretrained model. Client code should access pretrained models via these
    instances.

    Please see below for the usage and the available values.

    Example - Feature Extraction
        >>> import torchaudio
        >>>
        >>> bundle = torchaudio.pipelines.HUBERT_BASE
        >>>
        >>> # Build the model and load pretrained weight.
        >>> model = bundle.get_model()
        Downloading:
        100%|â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ| 360M/360M [00:06<00:00, 60.6MB/s]
        >>>
        >>> # Resample audio to the expected sampling rate
        >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate)
        >>>
        >>> # Extract acoustic features
        >>> features, _ = model.extract_features(waveform)
    Ú_pathÚ_paramsÚ_sample_rateÚ_normalize_waveformÚ_model_typeÚreturnc                 ó   — | j         S )zUSample rate of the audio that the model is trained on.

        :type: float
        )r   ©Úselfs    úTC:\Projects\Historical\venv\Lib\site-packages\torchaudio/pipelines/_wav2vec2/impl.pyÚsample_ratezWav2Vec2Bundle.sample_rate1   s   € ð Ô Ð ó    c                 ó6   — t          j        | j        |¦  «        S ©N)r   Ú_get_state_dictr   ©r   Ú	dl_kwargss     r   r   zWav2Vec2Bundle._get_state_dict9   s   € åÔ$ T¤Z°Ñ;Ô;Ð;r   N©r   c                óú   — t          j        | j        | j        ¦  «        }|                      |¦  «        }|                     |¦  «         | j        rt          j        |d¬¦  «        }|                     ¦   «          |S )a  Construct the model and load the pretrained weight.

        The weight file is downloaded from the internet and cached with
        :func:`torch.hub.load_state_dict_from_url`

        Args:
            dl_kwargs (dictionary of keyword arguments): Passed to :func:`torch.hub.load_state_dict_from_url`.

        Returns:
            Variation of :py:class:`~torchaudio.models.Wav2Vec2Model`.

            For the models listed below, an additional layer normalization is performed on the input.

            For all other models, a :py:class:`~torchaudio.models.Wav2Vec2Model` instance is returned.

            - WAV2VEC2_LARGE_LV60K
            - WAV2VEC2_ASR_LARGE_LV60K_10M
            - WAV2VEC2_ASR_LARGE_LV60K_100H
            - WAV2VEC2_ASR_LARGE_LV60K_960H
            - WAV2VEC2_XLSR53
            - WAV2VEC2_XLSR_300M
            - WAV2VEC2_XLSR_1B
            - WAV2VEC2_XLSR_2B
            - HUBERT_LARGE
            - HUBERT_XLARGE
            - HUBERT_ASR_LARGE
            - HUBERT_ASR_XLARGE
            - WAVLM_LARGE
        T)Únormalize_waveform)	r   Ú
_get_modelr   r   r   Úload_state_dictr   Ú_extend_modelÚeval)r   r   ÚmodelÚ
state_dicts       r   Ú	get_modelzWav2Vec2Bundle.get_model=   su   € õ< Ô  Ô!1°4´<Ñ@Ô@ˆØ×)Ò)¨)Ñ4Ô4ˆ
Ø×Ò˜jÑ)Ô)Ð)ØÔ#ð 	HÝÔ'¨À$ÐGÑGÔGˆEØ�
Š
‰ŒˆØˆr   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚstrÚ__annotations__r   r   ÚfloatÚboolÚpropertyr   r   r   r(   © r   r   r   r      sÁ   € € € € € € ðð ð: €J€J�JØ�#�s�(Œ^ÐÐÑØÐÐÑØÐÐÑØÐÐÑàð!˜Uð !ð !ð !ñ „Xð!ð<ð <ð <ð &*ð $ð $ð $¨fð $ð $ð $ð $ð $ð $r   r   c                   óx   — e Zd ZU dZeedf         ed<   dZeedf         ed<   ddœded	eedf         fd
„Z	d„ Z
dS )ÚWav2Vec2ASRBundleu£  Data class that bundles associated information to use pretrained
    :py:class:`~torchaudio.models.Wav2Vec2Model`.

    This class provides interfaces for instantiating the pretrained model along with
    the information necessary to retrieve pretrained weights and additional data
    to be used with the model.

    Torchaudio library instantiates objects of this class, each of which represents
    a different pretrained model. Client code should access pretrained models via these
    instances.

    Please see below for the usage and the available values.

    Example - ASR
        >>> import torchaudio
        >>>
        >>> bundle = torchaudio.pipelines.HUBERT_ASR_LARGE
        >>>
        >>> # Build the model and load pretrained weight.
        >>> model = bundle.get_model()
        Downloading:
        100%|â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ| 1.18G/1.18G [00:17<00:00, 73.8MB/s]
        >>>
        >>> # Check the corresponding labels of the output.
        >>> labels = bundle.get_labels()
        >>> print(labels)
        ('-', '|', 'E', 'T', 'A', 'O', 'N', 'I', 'H', 'S', 'R', 'D', 'L', 'U', 'M', 'W', 'C', 'F', 'G', 'Y', 'P', 'B', 'V', 'K', "'", 'X', 'J', 'Q', 'Z')
        >>>
        >>> # Resample audio to the expected sampling rate
        >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate)
        >>>
        >>> # Infer the label probability distribution
        >>> emissions, _ = model(waveform)
        >>>
        >>> # Pass emission to decoder
        >>> # `ctc_decode` is for illustration purpose only
        >>> transcripts = ctc_decode(emissions, labels)
    .Ú_labels©r	   é   é   Ú_remove_aux_axisú-©Úblankr<   r   c                ó   — |g| j         ¢R S )au  The output class labels.

        The first is blank token, and it is customizable.

        Args:
            blank (str, optional): Blank token. (default: ``'-'``)

        Returns:
            Tuple[str, ...]:
            For models fine-tuned on ASR, returns the tuple of strings representing
            the output class labels.

        Example
            >>> from torchaudio.pipelines import HUBERT_ASR_LARGE as bundle
            >>> bundle.get_labels()
            ('-', '|', 'E', 'T', 'A', 'O', 'N', 'I', 'H', 'S', 'R', 'D', 'L', 'U', 'M', 'W', 'C', 'F', 'G', 'Y', 'P', 'B', 'V', 'K', "'", 'X', 'J', 'Q', 'Z')
        )r5   )r   r<   s     r   Ú
get_labelszWav2Vec2ASRBundle.get_labels�   s   € ð, Ð%˜œÐ%Ð%Ð%r   c                 óB   — t          j        | j        || j        ¦  «        S r   )r   r   r   r9   r   s     r   r   z!Wav2Vec2ASRBundle._get_state_dict¨   s   € ÝÔ$ T¤Z°¸DÔ<QÑRÔRÐRr   N)r)   r*   r+   r,   r   r-   r.   r9   Úintr>   r   r2   r   r   r4   r4   d   s£   € € € € € € ð%ð %ðN �3˜�8Œ_ÐÐÑØ(1Ð�e˜C ˜H”oÐ1Ð1Ñ1ð
 ð&ð &ð &ð ð&ð 
ˆs�CˆxŒð	&ð &ð &ð &ð0Sð Sð Sð Sð Sr   r4   zwav2vec2_fairseq_base_ls960.pthÚextractor_modeÚ
group_normÚextractor_conv_layer_config))é   é
   é   ©rD   r8   r7   rG   rG   rG   ©rD   r7   r7   rH   Úextractor_conv_biasFÚencoder_embed_dimi   Úencoder_projection_dropoutgš™™™™™¹?Úencoder_pos_conv_kernelé€   Úencoder_pos_conv_groupsé   Úencoder_num_layersé   Úencoder_num_headsÚencoder_attention_dropoutÚencoder_ff_interm_featuresi   Úencoder_ff_interm_dropoutg        Úencoder_dropoutÚencoder_layer_norm_firstÚencoder_layer_dropgš™™™™™©?Úaux_num_outNi€>  ÚWav2Vec2)r   r   r   r   r   aª  Wav2vec 2.0 model ("base" architecture),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), not fine-tuned.

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
z)wav2vec2_fairseq_base_ls960_asr_ll10m.pthé   )r   r   r5   r   r   r   a9  Wav2vec 2.0 model ("base" architecture with an extra linear module),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and
fine-tuned for ASR on 10 minutes of transcribed audio from *Libri-Light* dataset
:cite:`librilight` ("train-10min" subset).

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z)wav2vec2_fairseq_base_ls960_asr_ls100.pth)r5   r   r   r   a  Wav2vec 2.0 model ("base" architecture with an extra linear module),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and
fine-tuned for ASR on 100 hours of transcribed audio from "train-clean-100" subset.

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z)wav2vec2_fairseq_base_ls960_asr_ls960.ptha  Wav2vec 2.0 model ("base" architecture with an extra linear module),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and
fine-tuned for ASR on the same audio with the corresponding transcripts.

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z wav2vec2_fairseq_large_ls960.pthi   é   i   gš™™™™™É?)r   r   r   a«  Wav2vec 2.0 model ("large" architecture),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), not fine-tuned.

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
z*wav2vec2_fairseq_large_ls960_asr_ll10m.ptha:  Wav2vec 2.0 model ("large" architecture with an extra linear module),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and
fine-tuned for ASR on 10 minutes of transcribed audio from *Libri-Light* dataset
:cite:`librilight` ("train-10min" subset).

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z*wav2vec2_fairseq_large_ls960_asr_ls100.ptha%  Wav2vec 2.0 model ("large" architecture with an extra linear module),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and
fine-tuned for ASR on 100 hours of transcribed audio from
the same dataset ("train-clean-100" subset).

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z*wav2vec2_fairseq_large_ls960_asr_ls960.ptha  Wav2vec 2.0 model ("large" architecture with an extra linear module),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), and
fine-tuned for ASR on the same audio with the corresponding transcripts.

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z wav2vec2_fairseq_large_lv60k.pthÚ
layer_normTaf  Wav2vec 2.0 model ("large-lv60k" architecture),
pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`,
not fine-tuned.

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
z*wav2vec2_fairseq_large_lv60k_asr_ll10m.pthaÝ  Wav2vec 2.0 model ("large-lv60k" architecture with an extra linear module),
pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`, and
fine-tuned for ASR on 10 minutes of transcribed audio from the same dataset ("train-10min" subset).

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z*wav2vec2_fairseq_large_lv60k_asr_ls100.pthaõ  Wav2vec 2.0 model ("large-lv60k" architecture with an extra linear module),
pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`, and
fine-tuned for ASR on 100 hours of transcribed audio from
*LibriSpeech* dataset :cite:`7178964` ("train-clean-100" subset).

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z*wav2vec2_fairseq_large_lv60k_asr_ls960.ptha+  Wav2vec 2.0 model ("large-lv60k" architecture with an extra linear module),
pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* :cite:`librilight` dataset, and
fine-tuned for ASR on 960 hours of transcribed audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500").

Originally published by the authors of *wav2vec 2.0* :cite:`baevski2020wav2vec` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z!wav2vec2_fairseq_large_xlsr53.ptha  Wav2vec 2.0 model ("base" architecture),
pre-trained on 56,000 hours of unlabeled audio from multiple datasets (
*Multilingual LibriSpeech* :cite:`Pratap_2020`,
*CommonVoice* :cite:`ardila2020common` and
*BABEL* :cite:`Gales2014SpeechRA`),
not fine-tuned.

Originally published by the authors of
*Unsupervised Cross-lingual Representation Learning for Speech Recognition*
:cite:`conneau2020unsupervised` under MIT License and redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/wav2vec#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
zhubert_fairseq_base_ls960.ptha­  HuBERT model ("base" architecture),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500"), not fine-tuned.

Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/hubert#pre-trained-and-fine-tuned-asr-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
zhubert_fairseq_large_ll60k.pthac  HuBERT model ("large" architecture),
pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`,
not fine-tuned.

Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/hubert#pre-trained-and-fine-tuned-asr-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
zhubert_fairseq_xlarge_ll60k.pthi   é0   i   ai  HuBERT model ("extra large" architecture),
pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`,
not fine-tuned.

Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/hubert#pre-trained-and-fine-tuned-asr-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
z(hubert_fairseq_large_ll60k_asr_ls960.ptha  HuBERT model ("large" architecture),
pre-trained on 60,000 hours of unlabeled audio from *Libri-Light* dataset :cite:`librilight`, and
fine-tuned for ASR on 960 hours of transcribed audio from *LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500").

Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/hubert#pre-trained-and-fine-tuned-asr-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z)hubert_fairseq_xlarge_ll60k_asr_ls960.ptha  HuBERT model ("extra large" architecture),
pre-trained on 60,000 hours of unlabeled audio from
*Libri-Light* dataset :cite:`librilight`, and
fine-tuned for ASR on 960 hours of transcribed audio from
*LibriSpeech* dataset :cite:`7178964`
(the combination of "train-clean-100", "train-clean-360", and "train-other-500").

Originally published by the authors of *HuBERT* :cite:`hsu2021hubert` under MIT License and
redistributed with the same license.
[`License <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/LICENSE>`__,
`Source <https://github.com/pytorch/fairseq/blob/ce6c9eeae163ac04b79539c78e74f292f29eaa18/examples/hubert#pre-trained-and-fine-tuned-asr-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z%wav2vec2_voxpopuli_base_10k_asr_de.pté    )r	   r7   r8   é#   )r5   r   r   r9   r   aµ  wav2vec 2.0 model ("base" architecture),
pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli`
("10k" subset, consisting of 23 languages), and
fine-tuned for ASR on 282 hours of transcribed audio from "de" subset.

Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and
redistributed with the same license.
[`License <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#license>`__,
`Source <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#asr-and-lm>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z%wav2vec2_voxpopuli_base_10k_asr_en.pté   )r	   r7   r8   é   aµ  wav2vec 2.0 model ("base" architecture),
pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli`
("10k" subset, consisting of 23 languages), and
fine-tuned for ASR on 543 hours of transcribed audio from "en" subset.

Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and
redistributed with the same license.
[`License <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#license>`__,
`Source <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#asr-and-lm>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z%wav2vec2_voxpopuli_base_10k_asr_es.ptr`   aµ  wav2vec 2.0 model ("base" architecture),
pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli`
("10k" subset, consisting of 23 languages), and
fine-tuned for ASR on 166 hours of transcribed audio from "es" subset.

Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and
redistributed with the same license.
[`License <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#license>`__,
`Source <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#asr-and-lm>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z%wav2vec2_voxpopuli_base_10k_asr_fr.pté+   aµ  wav2vec 2.0 model ("base" architecture),
pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli`
("10k" subset, consisting of 23 languages), and
fine-tuned for ASR on 211 hours of transcribed audio from "fr" subset.

Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and
redistributed with the same license.
[`License <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#license>`__,
`Source <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#asr-and-lm>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
z%wav2vec2_voxpopuli_base_10k_asr_it.pté%   r6   a´  wav2vec 2.0 model ("base" architecture),
pre-trained on 10k hours of unlabeled audio from *VoxPopuli* dataset :cite:`voxpopuli`
("10k" subset, consisting of 23 languages), and
fine-tuned for ASR on 91 hours of transcribed audio from "it" subset.

Originally published by the authors of *VoxPopuli* :cite:`voxpopuli` under CC BY-NC 4.0 and
redistributed with the same license.
[`License <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#license>`__,
`Source <https://github.com/facebookresearch/voxpopuli/tree/160e4d7915bad9f99b2c35b1d3833e51fd30abf2#asr-and-lm>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2ASRBundle` for the usage.
zwavlm_base.pthÚencoder_max_distancei   Úencoder_num_bucketsi@  ÚWavLM)r   r   r   aB  WavLM Base model ("base" architecture),
pre-trained on 960 hours of unlabeled audio from *LibriSpeech* dataset :cite:`7178964`, not fine-tuned.

Originally published by the authors of *WavLM* :cite:`chen2022wavlm` under MIT License and
redistributed with the same license.
[`License <https://github.com/microsoft/unilm/blob/65f15af2a307ebb64cfb25adf54375b002e6fe8d/LICENSE>`__,
`Source <https://github.com/microsoft/unilm/tree/65f15af2a307ebb64cfb25adf54375b002e6fe8d/wavlm#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
zwavlm_base_plus.ptha˜  WavLM Base+ model ("base" architecture),
pre-trained on 60,000 hours of Libri-Light dataset :cite:`librilight`, 10,000 hours of GigaSpeech :cite:`GigaSpeech2021`,
and 24,000 hours of *VoxPopuli* :cite:`voxpopuli`, not fine-tuned.

Originally published by the authors of *WavLM* :cite:`chen2022wavlm` under MIT License and
redistributed with the same license.
[`License <https://github.com/microsoft/unilm/blob/65f15af2a307ebb64cfb25adf54375b002e6fe8d/LICENSE>`__,
`Source <https://github.com/microsoft/unilm/tree/65f15af2a307ebb64cfb25adf54375b002e6fe8d/wavlm#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
zwavlm_large.ptha™  WavLM Large model ("large" architecture),
pre-trained on 60,000 hours of Libri-Light dataset :cite:`librilight`, 10,000 hours of GigaSpeech :cite:`GigaSpeech2021`,
and 24,000 hours of *VoxPopuli* :cite:`voxpopuli`, not fine-tuned.

Originally published by the authors of *WavLM* :cite:`chen2022wavlm` under MIT License and
redistributed with the same license.
[`License <https://github.com/microsoft/unilm/blob/65f15af2a307ebb64cfb25adf54375b002e6fe8d/LICENSE>`__,
`Source <https://github.com/microsoft/unilm/tree/65f15af2a307ebb64cfb25adf54375b002e6fe8d/wavlm#pre-trained-models>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for the usage.
zwav2vec2_xlsr_300m.ptha(  XLS-R model with 300 million parameters,
pre-trained on 436,000 hours of unlabeled audio from multiple datasets (
*Multilingual LibriSpeech* :cite:`Pratap_2020`,
*CommonVoice* :cite:`ardila2020common`,
*VoxLingua107* :cite:`valk2021voxlingua107`,
*BABEL* :cite:`Gales2014SpeechRA`, and
*VoxPopuli* :cite:`voxpopuli`) in 128 languages,
not fine-tuned.

Originally published by the authors of *XLS-R* :cite:`babu2021xls` under MIT License and
redistributed with the same license.
[`License <https://github.com/facebookresearch/fairseq/blob/30c912b73c0f88d41171879b2f03226a171004ef/LICENSE>`__,
`Source <https://github.com/facebookresearch/fairseq/tree/30c912b73c0f88d41171879b2f03226a171004ef/examples/wav2vec/xlsr#xls-r>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for usage details.
zwav2vec2_xlsr_1b.ptha&  XLS-R model with 1 billion parameters,
pre-trained on 436,000 hours of unlabeled audio from multiple datasets (
*Multilingual LibriSpeech* :cite:`Pratap_2020`,
*CommonVoice* :cite:`ardila2020common`,
*VoxLingua107* :cite:`valk2021voxlingua107`,
*BABEL* :cite:`Gales2014SpeechRA`, and
*VoxPopuli* :cite:`voxpopuli`) in 128 languages,
not fine-tuned.

Originally published by the authors of *XLS-R* :cite:`babu2021xls` under MIT License and
redistributed with the same license.
[`License <https://github.com/facebookresearch/fairseq/blob/30c912b73c0f88d41171879b2f03226a171004ef/LICENSE>`__,
`Source <https://github.com/facebookresearch/fairseq/tree/30c912b73c0f88d41171879b2f03226a171004ef/examples/wav2vec/xlsr#xls-r>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for usage details.
zwav2vec2_xlsr_2b.pthi€  i   a&  XLS-R model with 2 billion parameters,
pre-trained on 436,000 hours of unlabeled audio from multiple datasets (
*Multilingual LibriSpeech* :cite:`Pratap_2020`,
*CommonVoice* :cite:`ardila2020common`,
*VoxLingua107* :cite:`valk2021voxlingua107`,
*BABEL* :cite:`Gales2014SpeechRA`, and
*VoxPopuli* :cite:`voxpopuli`) in 128 languages,
not fine-tuned.

Originally published by the authors of *XLS-R* :cite:`babu2021xls` under MIT License and
redistributed with the same license.
[`License <https://github.com/facebookresearch/fairseq/blob/30c912b73c0f88d41171879b2f03226a171004ef/LICENSE>`__,
`Source <https://github.com/facebookresearch/fairseq/tree/30c912b73c0f88d41171879b2f03226a171004ef/examples/wav2vec/xlsr#xls-r>`__]

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2Bundle` for usage details.
c            	       óü   ‡ — e Zd ZdZ G d„ dej        ¦  «        Z G d„ dej        ¦  «        Zdde	e
         d	e
d
ee
df         fˆ fd„Zdddœded
efd„Zdde	e
         d	e
d
ee
ef         fd„Zd
efd„Zd
efd„Zˆ xZS )ÚWav2Vec2FABundleuÄ  Data class that bundles associated information to use pretrained :py:class:`~torchaudio.models.Wav2Vec2Model` for forced alignment.

    This class provides interfaces for instantiating the pretrained model along with
    the information necessary to retrieve pretrained weights and additional data
    to be used with the model.

    Torchaudio library instantiates objects of this class, each of which represents
    a different pretrained model. Client code should access pretrained models via these
    instances.

    Please see below for the usage and the available values.

    Example - Feature Extraction
        >>> import torchaudio
        >>>
        >>> bundle = torchaudio.pipelines.MMS_FA
        >>>
        >>> # Build the model and load pretrained weight.
        >>> model = bundle.get_model()
        Downloading:
        100%|â–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆâ–ˆ| 1.18G/1.18G [00:05<00:00, 216MB/s]
        >>>
        >>> # Resample audio to the expected sampling rate
        >>> waveform = torchaudio.functional.resample(waveform, sample_rate, bundle.sample_rate)
        >>>
        >>> # Estimate the probability of token distribution
        >>> emission, _ = model(waveform)
        >>>
        >>> # Generate frame-wise alignment
        >>> alignment, scores = torchaudio.functional.forced_align(
        >>>     emission, targets, input_lengths, target_lengths, blank=0)
        >>>
    c                   ó   — e Zd ZdZdS )úWav2Vec2FABundle.TokenizerzInterface of the tokenizerN©r)   r*   r+   r,   r2   r   r   Ú	Tokenizerrk     s   € € € € € Ø(Ð(Ð(Ð(r   rm   c                   ó   — e Zd ZdZdS )úWav2Vec2FABundle.AlignerzInterface of the alignerNrl   r2   r   r   ÚAlignerro     s   € € € € € Ø&Ð&Ð&Ð&r   rp   Ú*r:   Ústarr<   r   .c                 ó^   •— t          ¦   «                              |¬¦  «        }|€|ng |¢|‘R S )aÁ  Get the labels corresponding to the feature dimension of emission.

        The first is blank token, and it is customizable.

        Args:
            star (str or None, optional): Change or disable star token. (default: ``"*"``)
            blank (str, optional): Change the blank token. (default: ``'-'``)

        Returns:
            Tuple[str, ...]:
            For models fine-tuned on ASR, returns the tuple of strings representing
            the output class labels.

        Example
            >>> from torchaudio.pipelines import MMS_FA as bundle
            >>> bundle.get_labels()
            ('-', 'a', 'i', 'e', 'n', 'o', 'u', 't', 's', 'r', 'm', 'k', 'l', 'd', 'g', 'h', 'y', 'b', 'p', 'w', 'c', 'v', 'j', 'z', 'f', "'", 'q', 'x', '*')
            >>> bundle.get_labels(star=None)
            ('-', 'a', 'i', 'e', 'n', 'o', 'u', 't', 's', 'r', 'm', 'k', 'l', 'd', 'g', 'h', 'y', 'b', 'p', 'w', 'c', 'v', 'j', 'z', 'f', "'", 'q', 'x')
        r;   )Úsuperr>   )r   rr   r<   ÚlabelsÚ	__class__s       €r   r>   zWav2Vec2FABundle.get_labels  s7   ø€ õ* ‘”×#Ò#¨%Ð#Ñ0Ô0ˆØ˜ˆvˆv¨?¨V¨?°T¨?¨?Ð:r   TNr   Ú	with_starc                ó  — t          j        | j        | j        ¦  «        }t          j        | j        || j        ¦  «        }|                     |¦  «         t          j        || j	        d|¬¦  «        }| 
                    ¦   «          |S )a'  Construct the model and load the pretrained weight.

        The weight file is downloaded from the internet and cached with
        :func:`torch.hub.load_state_dict_from_url`

        Args:
            with_star (bool, optional): If enabled, the last dimension of output layer is
                extended by one, which corresponds to `star` token.
            dl_kwargs (dictionary of keyword arguments): Passed to :func:`torch.hub.load_state_dict_from_url`.

        Returns:
            Variation of :py:class:`~torchaudio.models.Wav2Vec2Model`.

            .. note::

               The model created with this method returns probability in log-domain,
               (i.e. :py:func:`torch.nn.functional.log_softmax` is applied), whereas
               the other Wav2Vec2 models returns logit.
        T)r!   Úapply_log_softmaxÚappend_star)r   r"   r   r   r   r   r9   r#   r$   r   r%   )r   rw   r   r&   r'   s        r   r(   zWav2Vec2FABundle.get_model5  s�   € õ( Ô  Ô!1°4´<Ñ@Ô@ˆÝÔ*¨4¬:°yÀ$ÔBWÑXÔXˆ
Ø×Ò˜jÑ)Ô)Ð)ÝÔ#Ø dÔ&>ÐRVÐdmð
ñ 
ô 
ˆð 	�
Š
‰ŒˆØˆr   c                 ó^   — d„ t          |                      ||¬¦  «        ¦  «        D ¦   «         S )aM  Get the mapping from token to index (in emission feature dim)

        Args:
            star (str or None, optional): Change or disable star token. (default: ``"*"``)
            blank (str, optional): Change the blank token. (default: ``'-'``)

        Returns:
            Tuple[str, ...]:
            For models fine-tuned on ASR, returns the tuple of strings representing
            the output class labels.

        Example
            >>> from torchaudio.pipelines import MMS_FA as bundle
            >>> bundle.get_dict()
            {'-': 0, 'a': 1, 'i': 2, 'e': 3, 'n': 4, 'o': 5, 'u': 6, 't': 7, 's': 8, 'r': 9, 'm': 10, 'k': 11, 'l': 12, 'd': 13, 'g': 14, 'h': 15, 'y': 16, 'b': 17, 'p': 18, 'w': 19, 'c': 20, 'v': 21, 'j': 22, 'z': 23, 'f': 24, "'": 25, 'q': 26, 'x': 27, '*': 28}
            >>> bundle.get_dict(star=None)
            {'-': 0, 'a': 1, 'i': 2, 'e': 3, 'n': 4, 'o': 5, 'u': 6, 't': 7, 's': 8, 'r': 9, 'm': 10, 'k': 11, 'l': 12, 'd': 13, 'g': 14, 'h': 15, 'y': 16, 'b': 17, 'p': 18, 'w': 19, 'c': 20, 'v': 21, 'j': 22, 'z': 23, 'f': 24, "'": 25, 'q': 26, 'x': 27}
        c                 ó   — i | ]\  }}||“Œ	S r2   r2   )Ú.0ÚiÚks      r   ú
<dictcomp>z-Wav2Vec2FABundle.get_dict.<locals>.<dictcomp>e  s   € ÐTÐTÐT™˜˜A��1ÐTÐTÐTr   )rr   r<   )Ú	enumerater>   )r   rr   r<   s      r   Úget_dictzWav2Vec2FABundle.get_dictR  s1   € ð& UÐT¥¨4¯?ª?ÀÈE¨?Ñ+RÔ+RÑ!SÔ!SÐTÑTÔTÐTr   c                 óN   — t          j        |                      ¦   «         ¦  «        S )zIInstantiate a Tokenizer.

        Returns:
            Tokenizer
        )r
   rm   r‚   r   s    r   Úget_tokenizerzWav2Vec2FABundle.get_tokenizerg  s   € õ Ô  §¢¡¤Ñ1Ô1Ð1r   c                 ó,   — t          j        d¬¦  «        S )zFInstantiate an Aligner.

        Returns:
            Aligner
        r   r;   )r
   rp   r   s    r   Úget_alignerzWav2Vec2FABundle.get_alignero  s   € õ Œ QÐ'Ñ'Ô'Ð'r   )rq   r:   )T)r)   r*   r+   r,   r
   Ú
ITokenizerrm   ÚIAlignerrp   r   r-   r   r>   r0   r   r(   r   r@   r‚   r„   r†   Ú__classcell__)rv   s   @r   ri   ri   ó  su  ø€ € € € € ð ð  ðD)ð )ð )ð )ð )�GÔ&ñ )ô )ð )ð'ð 'ð 'ð 'ð '�'Ô"ñ 'ô 'ð 'ð;ð ;˜x¨œ}ð ;¸3ð ;ÈÈsÐTWÈxÌð ;ð ;ð ;ð ;ð ;ð ;ð0¸Tð ð ð  4ð Àfð ð ð ð ð:Uð U˜X cœ]ð U¸ð UÀtÈCÐQTÈHÄ~ð Uð Uð Uð Uð*2˜yð 2ð 2ð 2ð 2ð(˜Wð (ð (ð (ð (ð (ð (ð (ð (r   ri   zQhttps://dl.fbaipublicfiles.com/mms/torchaudio/ctc_alignment_mling_uroman/model.pta  
Trained on 31K hours of data in 1,130 languages from *Scaling Speech Technology to 1,000+ Languages* :cite:`pratap2023scaling`.

Published by the authors of *Scaling Speech Technology to 1,000+ Languages* :cite:`pratap2023scaling` under [`CC-BY-NC 4.0 License <https://github.com/facebookresearch/fairseq/tree/100cd91db19bb27277a06a25eb4154c805b10189/examples/mms#license>`__].

Please refer to :py:class:`torchaudio.pipelines.Wav2Vec2FABundle` for usage details.

.. note::

   Unlike other Wav2Vec2 bundles, this model does not have a token for word boundary (like `|`). This makes the post-processing of alignments slightly different.
)6Údataclassesr   Útypingr   r   r   r   Útorch.nnr   Ú r
   r   Ú__all__r   r4   ÚWAV2VEC2_BASEr,   Ú_get_en_labelsÚWAV2VEC2_ASR_BASE_10MÚWAV2VEC2_ASR_BASE_100HÚWAV2VEC2_ASR_BASE_960HÚWAV2VEC2_LARGEÚWAV2VEC2_ASR_LARGE_10MÚWAV2VEC2_ASR_LARGE_100HÚWAV2VEC2_ASR_LARGE_960HÚWAV2VEC2_LARGE_LV60KÚWAV2VEC2_ASR_LARGE_LV60K_10MÚWAV2VEC2_ASR_LARGE_LV60K_100HÚWAV2VEC2_ASR_LARGE_LV60K_960HÚWAV2VEC2_XLSR53ÚHUBERT_BASEÚHUBERT_LARGEÚHUBERT_XLARGEÚHUBERT_ASR_LARGEÚHUBERT_ASR_XLARGEÚ_get_de_labelsÚVOXPOPULI_ASR_BASE_10K_DEÚ_get_vp_en_labelsÚVOXPOPULI_ASR_BASE_10K_ENÚ_get_es_labelsÚVOXPOPULI_ASR_BASE_10K_ESÚ_get_fr_labelsÚVOXPOPULI_ASR_BASE_10K_FRÚ_get_it_labelsÚVOXPOPULI_ASR_BASE_10K_ITÚ
WAVLM_BASEÚWAVLM_BASE_PLUSÚWAVLM_LARGEÚWAV2VEC2_XLSR_300MÚWAV2VEC2_XLSR_1BÚWAV2VEC2_XLSR_2Bri   Ú_get_mms_labelsÚMMS_FAr2   r   r   ú<module>r´      s¦   ðØ !Ð !Ð !Ð !Ð !Ð !Ø -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ð -Ð -à Ð Ð Ð Ð Ð à Ð Ð Ð Ð Ð Ð Ð ð €ð ðTð Tð Tð Tð Tñ Tô Tñ „ðTðn ðDSð DSð DSð DSð DS˜ñ DSô DSñ „ðDSðN �Ø
+ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜dð/ð0 	�tð1ð4 ØØð=ñ ô €ð@
€Ô ð *Ð)Ø
5ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜dð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? ñ  ô  Ð ðB!Ð Ô ð +Ð*Ø/ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜dð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? ñ  ô  Ð ðD"Ð Ô ð +Ð*Ø/ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜dð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? ñ  ô  Ð ðB"Ð Ô ð  �Ø&ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜cð/ð0 	�tð1ð4 ØØð=ñ ô €ð@
€Ô ð +Ð*Ø0ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? ñ  ô  Ð ðB"Ð Ô ð ,Ð+Ø0ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? ñ  ô  Ð ðB#Ð Ô ð ,Ð+Ø0ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? ñ  ô  Ð ðB#Ð Ô ð &�~Ø&ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜tðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�tð1ð4 ØØð=ñ ô Ð ð@
 Ð Ô ð  1Ð0Ø0ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜tðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð?  ñ   ô   Ð ðB
(Ð Ô $ð !2Ð 1Ø0ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜tðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? !ñ  !ô  !Ð ðB)Ð Ô %ð !2Ð 1Ø0ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜tðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? !ñ  !ô  !Ð ðB)Ð Ô %ð !�.Ø'ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜tðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�tð1ð4 ØØð=ñ ô €ð@€Ô ð  ˆnØ#ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜dð/ð0 	�tð1ð4 ØØð=ñ ô €ð@
€Ô ð ˆ~Ø$ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�tð1ð4 ØØð=ñ ô €ð@
€Ô ð �Ø%ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�tð1ð4 ØØð=ñ ô €ð@
€Ô ð %Ð$Ø.ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? ñ  ô  Ð ðBÐ Ô ð &Ð%Ø/ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? ñ  ô  Ð ðBÐ Ô ð  .Ð-Ø+ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØ"ØðA!ñ !ô !Ð ðD%Ð Ô !ð .Ð-Ø+ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜cð/ð0 	�rð1ð4 $ˆEÔ#Ñ%Ô%ØØØ"ØðA!ñ !ô !Ð ðD%Ð Ô !ð .Ð-Ø+ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØ"ØðA!ñ !ô !Ð ðD%Ð Ô !ð .Ð-Ø+ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØð? ñ  ô  Ð ðB%Ð Ô !ð .Ð-Ø+ðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Eð-ð. 	˜cð/ð0 	�rð1ð4 !ˆEÔ Ñ"Ô"ØØØØðA!ñ !ô !Ð ðD%Ð Ô !ð ˆ^ØðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	 ð%ð& 	˜sð'ð( 	$ Sð)ð* 	% dð+ð, 	$ Sð-ð. 	˜3ð/ð0 	# Eð1ð2 	˜dð3ð4 	�tð5ð ð8 ØØðA!ñ !ô !€
ðD	€
Ô ð !�.ØðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Sðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	 ð%ð& 	˜sð'ð( 	$ Sð)ð* 	% dð+ð, 	$ Sð-ð. 	˜3ð/ð0 	# Eð1ð2 	˜dð3ð4 	�tð5ð ð8 ØØðA!ñ !ô !€ðD
€Ô ð ˆnØðØ˜,ðà%ð (
ð (
ð (
ðð 	˜uðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	 ð%ð& 	˜sð'ð( 	$ Sð)ð* 	% dð+ð, 	$ Sð-ð. 	˜3ð/ð0 	# Dð1ð2 	˜dð3ð4 	�tð5ð ð8 ØØðA!ñ !ô !€ðD
€Ô ð $�^ØðØ˜,ðà%ð (
ð (
ð (
ðð 	˜tðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�tð1ð4 ØØð=ñ ô Ð ð@Ð Ô ð$ "�>ØðØ˜,ðà%ð (
ð (
ð (
ðð 	˜tðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�tð1ð4 ØØð=ñ ô Ð ð@Ð Ô ð" "�>ØðØ˜,ðà%ð (
ð (
ð (
ðð 	˜tðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�tð1ð4 ØØð=ñ ô Ð ð@Ð Ô ð$ ðA(ð A(ð A(ð A(ð A(Ð(ñ A(ô A(ñ „ðA(ðH 
Ð	ØWðØ˜,ðà%ð (
ð (
ð (
ðð 	˜tðð 	˜Tðð 	% cðð 	" 3ðð 	" 2ðð  	˜bð!ð" 	˜Rð#ð$ 	$ Sð%ð& 	% dð'ð( 	$ Sð)ð* 	˜3ð+ð, 	# Dð-ð. 	˜cð/ð0 	�rð1ð4 "ˆEÔ!Ñ#Ô#ØØØð? 
ñ  
ô  
€ðB
€„€€r   