





'''simple docstring'''




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


lowercase__    :      List[Any]						=    logging.get_logger(__name__)

lowercase__    :      int						=    {
    '''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  SCREAMING_SNAKE_CASE    (A_							):
     lowerCAmelCase					=       "speech_to_text_2"
     lowerCAmelCase					=       ["past_key_values"]
     lowerCAmelCase					=       {"num_attention_heads": "decoder_attention_heads", "hidden_size": "d_model"}


     def __init__(						self						,	_UpperCAmelCase=1_0000						,	_UpperCAmelCase=6						,	_UpperCAmelCase=2048						,	_UpperCAmelCase=4						,	_UpperCAmelCase=0.0						,	_UpperCAmelCase=True						,	_UpperCAmelCase="relu"						,	_UpperCAmelCase=256						,	_UpperCAmelCase=0.1						,	_UpperCAmelCase=0.0						,	_UpperCAmelCase=0.0						,	_UpperCAmelCase=0.02						,	_UpperCAmelCase=2						,	_UpperCAmelCase=True						,	_UpperCAmelCase=1						,	_UpperCAmelCase=0						,	_UpperCAmelCase=2						,	_UpperCAmelCase=1024						,	**_UpperCAmelCase						,	):

          '''simple docstring'''






          __A						: Dict      =       vocab_size
          __A						: List[Any]      =       d_model
          __A						: int      =       decoder_ffn_dim
          __A						: int      =       decoder_layers
          __A						: str      =       decoder_attention_heads
          __A						: Tuple      =       dropout
          __A						: str      =       attention_dropout
          __A						: Union[str, Any]      =       activation_dropout
          __A						: int      =       activation_function
          __A						: int      =       init_std
          __A						: Tuple      =       decoder_layerdrop
          __A						: Dict      =       use_cache
          __A						: str      =       decoder_layers
          __A						: Any      =       scale_embedding  # scale factor will be sqrt(d_model) if True
          __A						: Optional[Any]      =       max_target_positions

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




"""simple docstring"""







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_torch_available,
)


lowerCAmelCase_   						=   {
    'configuration_speecht5': [
        'SPEECHT5_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'SPEECHT5_PRETRAINED_HIFIGAN_CONFIG_ARCHIVE_MAP',
        'SpeechT5Config',
        'SpeechT5HifiGanConfig',
    ],
    'feature_extraction_speecht5': ['SpeechT5FeatureExtractor'],
    'processing_speecht5': ['SpeechT5Processor'],
}

try:
							if not is_sentencepiece_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowerCAmelCase_   						=   ['SpeechT5Tokenizer']

try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							lowerCAmelCase_   						=   [
							    'SPEECHT5_PRETRAINED_MODEL_ARCHIVE_LIST',
							    'SpeechT5ForSpeechToText',
							    'SpeechT5ForSpeechToSpeech',
							    'SpeechT5ForTextToSpeech',
							    'SpeechT5Model',
							    'SpeechT5PreTrainedModel',
							    'SpeechT5HifiGan',
							]

if TYPE_CHECKING:
							from .configuration_speechta import (
							    SPEECHT5_PRETRAINED_CONFIG_ARCHIVE_MAP,
							    SPEECHT5_PRETRAINED_HIFIGAN_CONFIG_ARCHIVE_MAP,
							    SpeechTaConfig,
							    SpeechTaHifiGanConfig,
							)
							from .feature_extraction_speechta import SpeechTaFeatureExtractor
							from .processing_speechta import SpeechTaProcessor

							try:
														if not is_sentencepiece_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .tokenization_speechta import SpeechTaTokenizer

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_speechta import (
														    SPEECHT5_PRETRAINED_MODEL_ARCHIVE_LIST,
														    SpeechTaForSpeechToSpeech,
														    SpeechTaForSpeechToText,
														    SpeechTaForTextToSpeech,
														    SpeechTaHifiGan,
														    SpeechTaModel,
														    SpeechTaPreTrainedModel,
														)

else:
							import sys

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