






from ..models.whisper import WhisperForConditionalGeneration, WhisperProcessor
from .base import PipelineTool






class 			_UpperCamelCase(       __SCREAMING_SNAKE_CASE		):
		__SCREAMING_SNAKE_CASE  :       str							=							'''openai/whisper-base'''
		__SCREAMING_SNAKE_CASE  :       List[Any]							=							(
		    '''This is a tool that transcribes an audio into text. It takes an input named `audio` and returns the '''
		    '''transcribed text.'''
		)
		__SCREAMING_SNAKE_CASE  :       str							=							'''transcriber'''
		__SCREAMING_SNAKE_CASE  :       List[Any]							=							WhisperProcessor
		__SCREAMING_SNAKE_CASE  :       Optional[int]							=							WhisperForConditionalGeneration

		__SCREAMING_SNAKE_CASE  :       List[str]							=							['''audio''']
		__SCREAMING_SNAKE_CASE  :       Optional[int]							=							['''text''']

		def    __lowerCAmelCase  (					self		:    Tuple    ,       SCREAMING_SNAKE_CASE__		:    List[Any]    ):



					'''simple docstring'''



					return self.pre_processor(__lowerCamelCase    ,       return_tensors='pt'    ).input_features

		def    __lowerCAmelCase  (					self		:    Optional[int]    ,       SCREAMING_SNAKE_CASE__		:    List[str]    ):



					'''simple docstring'''



					return self.model.generate(inputs=__lowerCamelCase    )



		def    __lowerCAmelCase  (					self		:    List[str]    ,       SCREAMING_SNAKE_CASE__		:    int    ):



					'''simple docstring'''



					return self.pre_processor.batch_decode(__lowerCamelCase    ,       skip_special_tokens=__lowerCamelCase    )[0]










"""simple docstring"""






from math import sqrt




def 			snake_case		(		lowerCAmelCase_ = 1000000	)						->				int:
  _snake_case   	=      0
  _snake_case   	=      0
  _snake_case   	=      42

  while num_cuboids <= limit:
    max_cuboid_size += 1
    for sum_shortest_sides in range(2  ,						2 * max_cuboid_size + 1	):
      if sqrt(sum_shortest_sides**2 + max_cuboid_size**2	).is_integer():
        num_cuboids += (
            min(lowerCAmelCase_  ,						sum_shortest_sides // 2	)
            - max(1  ,						sum_shortest_sides - max_cuboid_size	)
            + 1
        )

  return max_cuboid_size


if __name__ == "__main__":
     print(F"{solution() = }")





