"""simple docstring"""




from ...processing_utils import ProcessorMixin
class 						__A							( SCREAMING_SNAKE_CASE_		):
     _UpperCamelCase							:			List[Any]							=		"WhisperFeatureExtractor"
     _UpperCamelCase							:			List[Any]							=		"WhisperTokenizer"






     def __init__(		self				,     a__				,     a__  ):
       super().__init__(a__				,     a__  )
       _lowerCAmelCase						:       int  			=     self.feature_extractor
       _lowerCAmelCase						:       Union[str, Any]  			=     False






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






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

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

       if text is None:
         return inputs

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






     def     __A  (		self				,     *a__				,     **a__  ):
       return self.tokenizer.batch_decode(*a__				,     **a__  )






     def     __A  (		self				,     *a__				,     **a__  ):
       return self.tokenizer.decode(*a__				,     **a__  )






     def     __A  (		self				,     a__				,     a__="np"  ):
       return self.tokenizer.get_prompt_ids(a__				,     return_tensors=a__  )





"""simple docstring"""




from __future__ import annotations

_a      :		List[str]           =   10





def 							SCREAMING_SNAKE_CASE     (			_lowerCamelCase						:       list[int]	)       ->      list[int]:
  _lowerCAmelCase						:       Optional[int]  			=     1
  _lowerCAmelCase						:       Union[str, Any]  			=     max(_lowerCamelCase	)
  while placement <= max_digit:
    # declare and initialize empty buckets
    _lowerCAmelCase						:       list[list]  			=     [[] for _ in range(_lowerCamelCase	)]
    # split list_of_ints between the buckets
    for i in list_of_ints:
      _lowerCAmelCase						:       Tuple  			=     int((i / placement) % RADIX	)
      buckets[tmp].append(_lowerCamelCase	)
    # put each buckets' contents into list_of_ints
    _lowerCAmelCase						:       List[str]  			=     0
    for b in range(_lowerCamelCase	):
      for i in buckets[b]:
        _lowerCAmelCase						:       Any  			=     i
        a += 1
        # move to next
    placement *= RADIX
  return list_of_ints


if __name__ == "__main__":
     import doctest

     doctest.testmod()




