



'''simple docstring'''




import functools
import operator

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


lowerCamelCase							:Tuple       =						logging.get_logger(__name__)

lowerCamelCase							:List[str]       =						{
    "microsoft/unispeech-sat-base-100h-libri-ft": (
        "https://huggingface.co/microsoft/unispeech-sat-base-100h-libri-ft/resolve/main/config.json"
    ),
    # See all UniSpeechSat models at https://huggingface.co/models?filter=unispeech_sat
}







class      _lowerCAmelCase							(      __UpperCAmelCase			):
	__SCREAMING_SNAKE_CASE       :		Any		      = """unispeech-sat"""


	def __init__(self	,				lowercase=32	,				lowercase=768	,				lowercase=12	,				lowercase=12	,				lowercase=3072	,				lowercase="gelu"	,				lowercase=0.1	,				lowercase=0.1	,				lowercase=0.1	,				lowercase=0.0	,				lowercase=0.0	,				lowercase=0.1	,				lowercase=0.1	,				lowercase=0.02	,				lowercase=1E-5	,				lowercase="group"	,				lowercase="gelu"	,				lowercase=(512, 512, 512, 512, 512, 512, 512)	,				lowercase=(5, 2, 2, 2, 2, 2, 2)	,				lowercase=(10, 3, 3, 3, 3, 2, 2)	,				lowercase=False	,				lowercase=128	,				lowercase=16	,				lowercase=False	,				lowercase=True	,				lowercase=0.05	,				lowercase=10	,				lowercase=2	,				lowercase=0.0	,				lowercase=10	,				lowercase=0	,				lowercase=320	,				lowercase=2	,				lowercase=0.1	,				lowercase=100	,				lowercase=256	,				lowercase=256	,				lowercase=0.1	,				lowercase="mean"	,				lowercase=False	,				lowercase=False	,				lowercase=256	,				lowercase=(512, 512, 512, 512, 1500)	,				lowercase=(5, 3, 3, 1, 1)	,				lowercase=(1, 2, 3, 1, 1)	,				lowercase=512	,				lowercase=0	,				lowercase=1	,				lowercase=2	,				lowercase=504	,				**lowercase	,				):
				super().__init__(**_A	,				pad_token_id=_A	,				bos_token_id=_A	,				eos_token_id=_A							)
				A_     :						Any     =					hidden_size
				A_     :						int     =					feat_extract_norm
				A_     :						Optional[Any]     =					feat_extract_activation
				A_     :						List[str]     =					list(_A							)
				A_     :						Any     =					list(_A							)
				A_     :						str     =					list(_A							)
				A_     :						List[str]     =					conv_bias
				A_     :						Union[str, Any]     =					num_conv_pos_embeddings
				A_     :						List[str]     =					num_conv_pos_embedding_groups
				A_     :						Any     =					len(self.conv_dim							)
				A_     :						List[str]     =					num_hidden_layers
				A_     :						Optional[int]     =					intermediate_size
				A_     :						List[Any]     =					hidden_act
				A_     :						Dict     =					num_attention_heads
				A_     :						Any     =					hidden_dropout
				A_     :						Dict     =					attention_dropout
				A_     :						List[str]     =					activation_dropout
				A_     :						str     =					feat_proj_dropout
				A_     :						str     =					final_dropout
				A_     :						int     =					layerdrop
				A_     :						int     =					layer_norm_eps
				A_     :						Any     =					initializer_range
				A_     :						str     =					vocab_size
				A_     :						Dict     =					num_clusters
				A_     :						Optional[int]     =					do_stable_layer_norm
				A_     :						List[str]     =					use_weighted_layer_sum

				if (
				    (len(self.conv_stride							) != self.num_feat_extract_layers)
				    or (len(self.conv_kernel							) != self.num_feat_extract_layers)
				    or (len(self.conv_dim							) != self.num_feat_extract_layers)
				):
							raise ValueError(
							    """Configuration for convolutional layers is incorrect. It is required that `len(config.conv_dim)` =="""
							    """ `len(config.conv_stride)` == `len(config.conv_kernel)`, but is `len(config.conv_dim) ="""
							    F' {len(self.conv_dim							)}`, `len(config.conv_stride) = {len(self.conv_stride							)}`,'
							    F' `len(config.conv_kernel) = {len(self.conv_kernel							)}`.'							)

				# fine-tuning config parameters for SpecAugment: https://arxiv.org/abs/1904.08779
				A_     :						Optional[int]     =					apply_spec_augment
				A_     :						Dict     =					mask_time_prob
				A_     :						Optional[int]     =					mask_time_length
				A_     :						str     =					mask_time_min_masks
				A_     :						Optional[int]     =					mask_feature_prob
				A_     :						Any     =					mask_feature_length
				A_     :						Tuple     =					mask_feature_min_masks

				# parameters for pretraining with codevector quantized representations
				A_     :						List[str]     =					num_codevectors_per_group
				A_     :						Dict     =					num_codevector_groups
				A_     :						Tuple     =					contrastive_logits_temperature
				A_     :						Optional[int]     =					feat_quantizer_dropout
				A_     :						Any     =					num_negatives
				A_     :						List[str]     =					codevector_dim
				A_     :						Union[str, Any]     =					proj_codevector_dim
				A_     :						List[Any]     =					diversity_loss_weight

				# ctc loss
				A_     :						List[Any]     =					ctc_loss_reduction
				A_     :						Optional[int]     =					ctc_zero_infinity

				# SequenceClassification-specific parameter. Feel free to ignore for other classes.
				A_     :						Any     =					classifier_proj_size

				# XVector-specific parameters. Feel free to ignore for other classes.
				A_     :						Tuple     =					list(_A							)
				A_     :						Union[str, Any]     =					list(_A							)
				A_     :						Dict     =					list(_A							)
				A_     :						Optional[Any]     =					xvector_output_dim


	@property
	def    _a     (self							):
				return functools.reduce(operator.mul	,				self.conv_stride	,				1							)




'''simple docstring'''




lowerCamelCase							:Any       = {
    '''A''': '''.-''', '''B''': '''-...''', '''C''': '''-.-.''', '''D''': '''-..''', '''E''': '''.''', '''F''': '''..-.''', '''G''': '''--.''',
    '''H''': '''....''', '''I''': '''..''', '''J''': '''.---''', '''K''': '''-.-''', '''L''': '''.-..''', '''M''': '''--''', '''N''': '''-.''',
    '''O''': '''---''', '''P''': '''.--.''', '''Q''': '''--.-''', '''R''': '''.-.''', '''S''': '''...''', '''T''': '''-''', '''U''': '''..-''',
    '''V''': '''...-''', '''W''': '''.--''', '''X''': '''-..-''', '''Y''': '''-.--''', '''Z''': '''--..''', '''1''': '''.----''',
    '''2''': '''..---''', '''3''': '''...--''', '''4''': '''....-''', '''5''': '''.....''', '''6''': '''-....''', '''7''': '''--...''',
    '''8''': '''---..''', '''9''': '''----.''', '''0''': '''-----''', '''&''': '''.-...''', '''@''': '''.--.-.''',
    ''':''': '''---...''', ''',''': '''--..--''', '''.''': '''.-.-.-''', '''\'''': '''.----.''', '''"''': '''.-..-.''',
    '''?''': '''..--..''', '''/''': '''-..-.''', '''=''': '''-...-''', '''+''': '''.-.-.''', '''-''': '''-....-''',
    '''(''': '''-.--.''', ''')''': '''-.--.-''', '''!''': '''-.-.--''', ''' ''': '''/'''
}  # Exclamation mark is not in ITU-R recommendation
# fmt: on
lowerCamelCase							:Any       = {value: key for key, value in MORSE_CODE_DICT.items()}



def      a      (			lowerCamelCase__   ):
			'''simple docstring'''





			return " ".join(MORSE_CODE_DICT[char] for char in message.upper()   )



def      a      (			lowerCamelCase__   ):
			'''simple docstring'''





			return "".join(REVERSE_DICT[char] for char in message.split()   )



def      a      (			):
			'''simple docstring'''





			A_     :						List[str]     =					"""Morse code here!"""
			print(lowerCamelCase__   )
			A_     :						str     =					encrypt(lowerCamelCase__   )
			print(lowerCamelCase__   )
			A_     :						Dict     =					decrypt(lowerCamelCase__   )
			print(lowerCamelCase__   )


if __name__ == "__main__":
						main()