from ...processing_utils import ProcessorMixin







class __snake_case				(						lowerCamelCase_		):
   lowerCAmelCase_														=							"WhisperFeatureExtractor"
   lowerCAmelCase_														=							"WhisperTokenizer"




   def __init__(    self			:				Optional[int]       ,	_lowercase			:				str       ,	_lowercase			:				str      ):



     """simple docstring"""






     super().__init__(_lowercase       ,	_lowercase      )
     SCREAMING_SNAKE_CASE__										=      self.feature_extractor
     SCREAMING_SNAKE_CASE__										=      False




   def 	__a						(    self			:				List[str]       ,	_lowercase			:				int=None       ,	_lowercase			:				Tuple=None       ,	_lowercase			:				Optional[int]=True      ):



     """simple docstring"""






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




   def __call__(    self			:				List[Any]       ,	*_lowercase			:				str       ,	**_lowercase			:				Dict      ):



     """simple docstring"""






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

     SCREAMING_SNAKE_CASE__										=      kwargs.pop("""audio"""       ,	_lowercase      )
     SCREAMING_SNAKE_CASE__										=      kwargs.pop("""sampling_rate"""       ,	_lowercase      )
     SCREAMING_SNAKE_CASE__										=      kwargs.pop("""text"""       ,	_lowercase      )
     if len(_lowercase      ) > 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(_lowercase       ,	*_lowercase       ,	sampling_rate=_lowercase       ,	**_lowercase      )
     if text is not None:
       SCREAMING_SNAKE_CASE__										=      self.tokenizer(_lowercase       ,	**_lowercase      )

     if text is None:
       return inputs

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




   def 	__a						(    self			:				Any       ,	*_lowercase			:				Any       ,	**_lowercase			:				Dict      ):



     """simple docstring"""






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




   def 	__a						(    self			:				Optional[Any]       ,	*_lowercase			:				List[str]       ,	**_lowercase			:				Dict      ):



     """simple docstring"""






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




   def 	__a						(    self			:				Optional[int]       ,	_lowercase			:				str       ,	_lowercase			:				str="np"      ):



     """simple docstring"""






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

__lowerCamelCase			: List[Any]							   =		6_5521



def 	__SCREAMING_SNAKE_CASE  (					__UpperCamelCase    :       str	)							->					int:







  """simple docstring"""





  SCREAMING_SNAKE_CASE__										=      1
  SCREAMING_SNAKE_CASE__										=      0
  for plain_chr in plain_text:
    SCREAMING_SNAKE_CASE__										=      (a + ord(__UpperCamelCase	)) % MOD_ADLER
    SCREAMING_SNAKE_CASE__										=      (b + a) % MOD_ADLER
  return (b << 16) | a
