


from ...processing_utils import ProcessorMixin





class   __a			(    A_      ):
 __lowercase :							Optional[Any]        = '''WhisperFeatureExtractor'''
 __lowercase :							List[Any]        = '''WhisperTokenizer'''
 def __init__(   self				, lowerCAmelCase__				, lowerCAmelCase__ )					->				List[Any]:




        '''simple docstring'''
        super().__init__(lowerCAmelCase__				, lowerCAmelCase__ )
        lowercase__:   Any  			=   self.feature_extractor
        lowercase__:   Union[str, Any]  			=   False
 def 		SCREAMING_SNAKE_CASE__   (   self				, lowerCAmelCase__=None				, lowerCAmelCase__=None				, lowerCAmelCase__=True )					->				Optional[int]:




        '''simple docstring'''
        return self.tokenizer.get_decoder_prompt_ids(task=lowerCAmelCase__				, language=lowerCAmelCase__				, no_timestamps=lowerCAmelCase__ )
 def __call__(   self				, *lowerCAmelCase__				, **lowerCAmelCase__ )					->				Optional[Any]:




        '''simple docstring'''
        # For backward compatibility
        if self._in_target_context_manager:
               return self.current_processor(*lowerCAmelCase__				, **lowerCAmelCase__ )

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

        if text is None:
               return inputs

        elif audio is None:
               return encodings
        else:
               lowercase__:   Any  			=   encodings['input_ids']
               return inputs
 def 		SCREAMING_SNAKE_CASE__   (   self				, *lowerCAmelCase__				, **lowerCAmelCase__ )					->				List[str]:




        '''simple docstring'''
        return self.tokenizer.batch_decode(*lowerCAmelCase__				, **lowerCAmelCase__ )
 def 		SCREAMING_SNAKE_CASE__   (   self				, *lowerCAmelCase__				, **lowerCAmelCase__ )					->				Dict:




        '''simple docstring'''
        return self.tokenizer.decode(*lowerCAmelCase__				, **lowerCAmelCase__ )
 def 		SCREAMING_SNAKE_CASE__   (   self				, lowerCAmelCase__				, lowerCAmelCase__="np" )					->				Any:




        '''simple docstring'''
        return self.tokenizer.get_prompt_ids(lowerCAmelCase__				, return_tensors=lowerCAmelCase__ )






from collections.abc import Sequence







def        _lowerCamelCase(	lowercase__   , lowercase__ = False	)						->	float:

		'''simple docstring'''







		if not arr:
				return 0

		__lowercase=			0 if allow_empty_subarrays else float('-inf'	)
		__lowercase=			0.0
		for num in arr:
				__lowercase=			max(0 if allow_empty_subarrays else num   , curr_sum + num	)
				__lowercase=			max(lowercase__   , lowercase__	)

		return max_sum


if __name__ == "__main__":
	from doctest import testmod

	testmod()

	lowerCAmelCase           =		[-2, 1, -3, 4, -1, 2, 1, -5, 4]
	print(F'{max_subarray_sum(nums) = }')






