




from ...processing_utils import ProcessorMixin







class a (     __SCREAMING_SNAKE_CASE  ):
						"""simple docstring"""

						UpperCamelCase_	:       Any       	=		'WhisperFeatureExtractor'
						UpperCamelCase_	:       List[str]       	=		'WhisperTokenizer'






						def __init__( self :     List[str]				,							lowerCamelCase__ :     str				,							lowerCamelCase__ :     Optional[Any]				)    ->						int:
													"""simple docstring"""


													super().__init__(lowerCamelCase__				,							lowerCamelCase__				)
													__lowercase      =    self.feature_extractor
													__lowercase      =    False






						def     UpperCAmelCase_      ( self :     Any				,							lowerCamelCase__ :     List[str]=None				,							lowerCamelCase__ :     int=None				,							lowerCamelCase__ :     int=True				)    ->						int:
													"""simple docstring"""


													return self.tokenizer.get_decoder_prompt_ids(task=lowerCamelCase__				,							language=lowerCamelCase__				,							no_timestamps=lowerCamelCase__				)






						def __call__( self :     Optional[Any]				,							*lowerCamelCase__ :     List[Any]				,							**lowerCamelCase__ :     str				)    ->						Dict:
													"""simple docstring"""


													if self._in_target_context_manager:
																				return self.current_processor(*lowerCamelCase__				,							**lowerCamelCase__				)

													__lowercase      =    kwargs.pop('''audio'''				,							lowerCamelCase__				)
													__lowercase      =    kwargs.pop('''sampling_rate'''				,							lowerCamelCase__				)
													__lowercase      =    kwargs.pop('''text'''				,							lowerCamelCase__				)
													if len(lowerCamelCase__				) > 0:
																				__lowercase      =    args[0]
																				__lowercase      =    args[1:]

													if audio is None and text is None:
																				raise ValueError('''You need to specify either an `audio` or `text` input to process.'''				)

													if audio is not None:
																				__lowercase      =    self.feature_extractor(lowerCamelCase__				,							*lowerCamelCase__				,							sampling_rate=lowerCamelCase__				,							**lowerCamelCase__				)
													if text is not None:
																				__lowercase      =    self.tokenizer(lowerCamelCase__				,							**lowerCamelCase__				)

													if text is None:
																				return inputs

													elif audio is None:
																				return encodings
													else:
																				__lowercase      =    encodings['''input_ids''']
																				return inputs






						def     UpperCAmelCase_      ( self :     Dict				,							*lowerCamelCase__ :     List[Any]				,							**lowerCamelCase__ :     Optional[Any]				)    ->						Optional[Any]:
													"""simple docstring"""


													return self.tokenizer.batch_decode(*lowerCamelCase__				,							**lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     Any				,							*lowerCamelCase__ :     List[Any]				,							**lowerCamelCase__ :     List[str]				)    ->						List[str]:
													"""simple docstring"""


													return self.tokenizer.decode(*lowerCamelCase__				,							**lowerCamelCase__				)






						def     UpperCAmelCase_      ( self :     List[Any]				,							lowerCamelCase__ :     str				,							lowerCamelCase__ :     Dict="np"				)    ->						Union[str, Any]:
													"""simple docstring"""


													return self.tokenizer.get_prompt_ids(lowerCamelCase__				,							return_tensors=lowerCamelCase__				)












import math







def 		_A(       )    -> None:
							'''simple docstring'''


							__lowercase      =    input('''Enter message: '''				)
							__lowercase      =    int(input(F'Enter key [2-{len(UpperCamelCase__				) - 1}]: '				)				)
							__lowercase      =    input('''Encryption/Decryption [e/d]: '''				)

							if mode.lower().startswith('''e'''				):
														__lowercase      =    encrypt_message(UpperCamelCase__				,       UpperCamelCase__				)
							elif mode.lower().startswith('''d'''				):
														__lowercase      =    decrypt_message(UpperCamelCase__				,       UpperCamelCase__				)

							# Append pipe symbol (vertical bar) to identify spaces at the end.
							print(F'Output:\n{text + "|"}'				)







def 		_A(       UpperCamelCase__							:			int				,       UpperCamelCase__							:			str				)    -> str:
							'''simple docstring'''


							__lowercase      =    [''''''] * key
							for col in range(UpperCamelCase__				):
														__lowercase      =    col
														while pointer < len(UpperCamelCase__				):
																					cipher_text[col] += message[pointer]
																					pointer += key
							return "".join(UpperCamelCase__				)







def 		_A(       UpperCamelCase__							:			int				,       UpperCamelCase__							:			str				)    -> str:
							'''simple docstring'''


							__lowercase      =    math.ceil(len(UpperCamelCase__				) / key				)
							__lowercase      =    key
							__lowercase      =    (num_cols * num_rows) - len(UpperCamelCase__				)
							__lowercase      =    [''''''] * num_cols
							__lowercase      =    0
							__lowercase      =    0

							for symbol in message:
														plain_text[col] += symbol
														col += 1

														if (
														    (col == num_cols)
														    or (col == num_cols - 1)
														    and (row >= num_rows - num_shaded_boxes)
														):
																					__lowercase      =    0
																					row += 1

							return "".join(UpperCamelCase__				)


if __name__ == "__main__":
			import doctest

			doctest.testmod()
			main()






