

'''simple docstring'''






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


lowerCAmelCase__											=	logging.get_logger(__name__)

lowerCAmelCase__											=	{
    '''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 			lowercase_	(lowerCamelCase__      ):




  """simple docstring"""




  SCREAMING_SNAKE_CASE    :  List[Any]							=			'speech_to_text_2'
  SCREAMING_SNAKE_CASE    :  Dict							=			['past_key_values']
  SCREAMING_SNAKE_CASE    :  List[Any]							=			{'num_attention_heads': 'decoder_attention_heads', 'hidden_size': 'd_model'}






  def __init__(      self   :     Any					,lowercase__   :     List[str]=1_0_0_0_0					,lowercase__   :     List[Any]=6					,lowercase__   :     int=2_0_4_8					,lowercase__   :     int=4					,lowercase__   :     Any=0.0					,lowercase__   :     Optional[int]=True					,lowercase__   :     Optional[int]="relu"					,lowercase__   :     Union[str, Any]=2_5_6					,lowercase__   :     Optional[Any]=0.1					,lowercase__   :     str=0.0					,lowercase__   :     Union[str, Any]=0.0					,lowercase__   :     Dict=0.0_2					,lowercase__   :     Any=2					,lowercase__   :     Dict=True					,lowercase__   :     List[str]=1					,lowercase__   :     Tuple=0					,lowercase__   :     Optional[Any]=2					,lowercase__   :     Optional[int]=1_0_2_4					,**lowercase__   :     List[Any]					,):
   __lowercase							  = vocab_size
   __lowercase							  = d_model
   __lowercase							  = decoder_ffn_dim
   __lowercase							  = decoder_layers
   __lowercase							  = decoder_attention_heads
   __lowercase							  = dropout
   __lowercase							  = attention_dropout
   __lowercase							  = activation_dropout
   __lowercase							  = activation_function
   __lowercase							  = init_std
   __lowercase							  = decoder_layerdrop
   __lowercase							  = use_cache
   __lowercase							  = decoder_layers
   __lowercase							  = scale_embedding  # scale factor will be sqrt(d_model) if True
   __lowercase							  = max_target_positions

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



import re
def  lowerCAmelCase__			(  SCREAMING_SNAKE_CASE_     )				->		str:

			if len(re.findall('[ATCG]'       ,							SCREAMING_SNAKE_CASE_     )     ) != len(SCREAMING_SNAKE_CASE_     ):
						raise ValueError('Invalid Strand'     )

			return dna.translate(dna.maketrans('ATCG'       ,							'TAGC'     )     )


if __name__ == "__main__":
					import doctest

					doctest.testmod()