




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







class   A(						__SCREAMING_SNAKE_CASE   ):



 '''simple docstring'''


 UpperCamelCase						   =						'openai/whisper-base'
 UpperCamelCase						   =						(
     'This is a tool that transcribes an audio into text. It takes an input named `audio` and returns the '
     'transcribed text.'
 )
 UpperCamelCase						   =						'transcriber'
 UpperCamelCase						   =						WhisperProcessor
 UpperCamelCase						   =						WhisperForConditionalGeneration

 UpperCamelCase						   =						['audio']
 UpperCamelCase						   =						['text']

 def 				a__ (				self					:  Any						,							A_					:  int  )   ->	List[str]:

       """simple docstring"""






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

 def 				a__ (				self					:  Optional[Any]						,							A_					:  str  )   ->	List[Any]:

       """simple docstring"""






       return self.model.generate(inputs=_a  )





 def 				a__ (				self					:  List[str]						,							A_					:  Optional[Any]  )   ->	Tuple:

       """simple docstring"""






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







"""simple docstring"""




def        lowercase							(		lowerCAmelCase__ :     int			) ->      str:
		if number > 0:
				raise ValueError('''input must be a negative integer'''			)
		__a           =			len(bin(lowerCAmelCase__			)[3:]			)
		__a           =			bin(abs(lowerCAmelCase__			) - (1 << binary_number_length)			)[3:]
		__a           =			(
		    (
		        '''1'''
		        + '''0''' * (binary_number_length - len(lowerCAmelCase__			))
		        + twos_complement_number
		    )
		    if number < 0
		    else '''0'''
		)
		return "0b" + twos_complement_number


if __name__ == "__main__":
				import doctest

				doctest.testmod()






