

"""simple docstring"""




from ...processing_utils import ProcessorMixin

class 			a					(		UpperCAmelCase			):
						_lowercase        =     "WhisperFeatureExtractor"
						_lowercase        =     "WhisperTokenizer"


						def __init__(    self  ,   A_  ,   A_		):







										'''simple docstring'''


										super().__init__(A_  ,   A_		)
										_UpperCAmelCase    :						List[str]							=      self.feature_extractor
										_UpperCAmelCase    :						Optional[Any]							=      False


						def     _UpperCAmelCase			(    self  ,   A_=None  ,   A_=None  ,   A_=True		):







										'''simple docstring'''


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


						def __call__(    self  ,   *A_  ,   **A_		):







										'''simple docstring'''


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

										_UpperCAmelCase    :						Any							=      kwargs.pop("audio"  ,   A_		)
										_UpperCAmelCase    :						List[Any]							=      kwargs.pop("sampling_rate"  ,   A_		)
										_UpperCAmelCase    :						Tuple							=      kwargs.pop("text"  ,   A_		)
										if len(A_		) > 0:
														_UpperCAmelCase    :						str							=      args[0]
														_UpperCAmelCase    :						List[Any]							=      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:
														_UpperCAmelCase    :						Optional[int]							=      self.feature_extractor(A_  ,   *A_  ,   sampling_rate=A_  ,   **A_		)
										if text is not None:
														_UpperCAmelCase    :						Tuple							=      self.tokenizer(A_  ,   **A_		)

										if text is None:
														return inputs

										elif audio is None:
														return encodings
										else:
														_UpperCAmelCase    :						Optional[Any]							=      encodings["input_ids"]
														return inputs


						def     _UpperCAmelCase			(    self  ,   *A_  ,   **A_		):







										'''simple docstring'''


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


						def     _UpperCAmelCase			(    self  ,   *A_  ,   **A_		):







										'''simple docstring'''


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





						def     _UpperCAmelCase			(    self  ,   A_  ,   A_="np"		):







										'''simple docstring'''


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





def 							__SCREAMING_SNAKE_CASE							(			lowerCAmelCase:					int	)				->    int:
				if not isinstance(lowerCAmelCase					, lowerCAmelCase	):
								raise TypeError("Input value must be an 'int' type"	)

				_UpperCAmelCase    :						List[Any]							=      0
				while number:
								position += 1
								number >>= 1

				return position


if __name__ == "__main__":
					import doctest

					doctest.testmod()


