
'''simple docstring'''







from ...processing_utils import ProcessorMixin


class 			lowerCAmelCase (				__UpperCAmelCase			):
		a							:					str       =					"""WhisperFeatureExtractor"""
		a							:					Dict       =					"""WhisperTokenizer"""




		def __init__(				self					,						UpperCamelCase					,						UpperCamelCase      ):
								super().__init__(UpperCamelCase					,						UpperCamelCase      )
								_SCREAMING_SNAKE_CASE				= self.feature_extractor
								_SCREAMING_SNAKE_CASE				= False




		def     lowercase       (				self					,						UpperCamelCase=None					,						UpperCamelCase=None					,						UpperCamelCase=True      ):
								return self.tokenizer.get_decoder_prompt_ids(task=UpperCamelCase					,						language=UpperCamelCase					,						no_timestamps=UpperCamelCase      )




		def __call__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								# For backward compatibility
								if self._in_target_context_manager:
														return self.current_processor(*UpperCamelCase					,						**UpperCamelCase      )

								_SCREAMING_SNAKE_CASE				= kwargs.pop("audio"					,						UpperCamelCase      )
								_SCREAMING_SNAKE_CASE				= kwargs.pop("sampling_rate"					,						UpperCamelCase      )
								_SCREAMING_SNAKE_CASE				= kwargs.pop("text"					,						UpperCamelCase      )
								if len(UpperCamelCase      ) > 0:
														_SCREAMING_SNAKE_CASE				= args[0]
														_SCREAMING_SNAKE_CASE				= 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:
														_SCREAMING_SNAKE_CASE				= self.feature_extractor(UpperCamelCase					,						*UpperCamelCase					,						sampling_rate=UpperCamelCase					,						**UpperCamelCase      )
								if text is not None:
														_SCREAMING_SNAKE_CASE				= self.tokenizer(UpperCamelCase					,						**UpperCamelCase      )

								if text is None:
														return inputs

								elif audio is None:
														return encodings
								else:
														_SCREAMING_SNAKE_CASE				= encodings["input_ids"]
														return inputs




		def     lowercase       (				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								return self.tokenizer.batch_decode(*UpperCamelCase					,						**UpperCamelCase      )




		def     lowercase       (				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								return self.tokenizer.decode(*UpperCamelCase					,						**UpperCamelCase      )




		def     lowercase       (				self					,						UpperCamelCase					,						UpperCamelCase="np"      ):
								return self.tokenizer.get_prompt_ids(UpperCamelCase					,						return_tensors=UpperCamelCase      )

'''simple docstring'''







from ..utils import DummyObject, requires_backends


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Dict       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Tuple       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					str       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Tuple       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					List[Any]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Any       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Any       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					int       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					str       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Any       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Any       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Optional[Any]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Union[str, Any]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Optional[Any]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					str       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Union[str, Any]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					int       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Dict       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					List[str]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Optional[Any]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Optional[int]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Dict       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Dict       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					str       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Optional[Any]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Tuple       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Union[str, Any]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					str       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Optional[int]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Optional[Any]       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )


class 			lowerCAmelCase (				metaclass=__UpperCAmelCase			):
		a							:					Dict       =					["""sentencepiece"""]




		def __init__(				self					,						*UpperCamelCase					,						**UpperCamelCase      ):
								requires_backends(self					,						["sentencepiece"]      )