from ...configuration_utils import PretrainedConfig
from ...utils import logging


__lowercase											=      logging.get_logger(__name__)

__lowercase											=      {
    '''facebook/s2t-wav2vec2-large-en-de''': (
        '''https://huggingface.co/facebook/s2t-wav2vec2-large-en-de/resolve/main/config.json'''
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech2text2
}


class 			lowerCamelCase_  (     UpperCAmelCase_				):






    '''simple docstring'''






    a__			:		str      			=   """speech_to_text_2"""
    a__			:		List[Any]      			=   ["""past_key_values"""]
    a__			:		Optional[int]      			=   {"""num_attention_heads""": """decoder_attention_heads""", """hidden_size""": """d_model"""}







    def __init__(			self				,				__lowercase=10_000				,				__lowercase=6				,				__lowercase=2_048				,				__lowercase=4				,				__lowercase=0.0				,				__lowercase=True				,				__lowercase="relu"				,				__lowercase=256				,				__lowercase=0.1				,				__lowercase=0.0				,				__lowercase=0.0				,				__lowercase=0.02				,				__lowercase=2				,				__lowercase=True				,				__lowercase=1				,				__lowercase=0				,				__lowercase=2				,				__lowercase=1_024				,				**__lowercase				,				) ->			List[str]:
        __UpperCamelCase  :Optional[int]    						=	vocab_size
        __UpperCamelCase  :Dict    						=	d_model
        __UpperCamelCase  :List[str]    						=	decoder_ffn_dim
        __UpperCamelCase  :Union[str, Any]    						=	decoder_layers
        __UpperCamelCase  :List[Any]    						=	decoder_attention_heads
        __UpperCamelCase  :List[Any]    						=	dropout
        __UpperCamelCase  :Optional[int]    						=	attention_dropout
        __UpperCamelCase  :Any    						=	activation_dropout
        __UpperCamelCase  :Tuple    						=	activation_function
        __UpperCamelCase  :Optional[int]    						=	init_std
        __UpperCamelCase  :Optional[int]    						=	decoder_layerdrop
        __UpperCamelCase  :List[Any]    						=	use_cache
        __UpperCamelCase  :List[str]    						=	decoder_layers
        __UpperCamelCase  :List[Any]    						=	scale_embedding  # scale factor will be sqrt(d_model) if True
        __UpperCamelCase  :Dict    						=	max_target_positions

        super().__init__(
            pad_token_id=__lowercase				,				bos_token_id=__lowercase				,				eos_token_id=__lowercase				,				decoder_start_token_id=__lowercase				,				**__lowercase				,				)






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_speech_available, is_torch_available


__lowercase											=      {
    '''configuration_audio_spectrogram_transformer''': [
        '''AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''ASTConfig''',
    ]
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowercase											=      [
        '''AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST''',
        '''ASTForAudioClassification''',
        '''ASTModel''',
        '''ASTPreTrainedModel''',
    ]

try:
    if not is_speech_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    __lowercase											=      ['''ASTFeatureExtractor''']

if TYPE_CHECKING:
    from .configuration_audio_spectrogram_transformer import (
        AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
        ASTConfig,
    )

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_audio_spectrogram_transformer import (
            AUDIO_SPECTROGRAM_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            ASTForAudioClassification,
            ASTModel,
            ASTPreTrainedModel,
        )

    try:
        if not is_speech_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .feature_extraction_audio_spectrogram_transformer import ASTFeatureExtractor


else:
    import sys

    __lowercase											=      _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)





