






'''simple docstring'''





from ...processing_utils import ProcessorMixin
class 				lowercase       (							_UpperCamelCase      ):


    '''simple docstring'''

    lowerCAmelCase__      				=							"WhisperFeatureExtractor"
    lowerCAmelCase__      				=							"WhisperTokenizer"

    def __init__(					self     :     List[str]				,     __lowerCamelCase     :     Union[str, Any]				,     __lowerCamelCase     :     Optional[Any]     )							->							Tuple:

     '''simple docstring'''




     super().__init__(_UpperCAmelCase				,     _UpperCAmelCase     )
     lowerCamelCase__  =     self.feature_extractor
     lowerCamelCase__  =     False

    def    a__				(					self     :     Optional[Any]				,     __lowerCamelCase     :     Optional[int]=None				,     __lowerCamelCase     :     Tuple=None				,     __lowerCamelCase     :     Any=True     )							->							Union[str, Any]:

     '''simple docstring'''




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

    def __call__(					self     :     int				,     *__lowerCamelCase     :     Optional[Any]				,     **__lowerCamelCase     :     Dict     )							->							int:

     '''simple docstring'''




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

     lowerCamelCase__  =     kwargs.pop("audio"				,     _UpperCAmelCase     )
     lowerCamelCase__  =     kwargs.pop("sampling_rate"				,     _UpperCAmelCase     )
     lowerCamelCase__  =     kwargs.pop("text"				,     _UpperCAmelCase     )
     if len(_UpperCAmelCase     ) > 0:
      lowerCamelCase__  =     args[0]
      lowerCamelCase__  =     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__  =     self.feature_extractor(_UpperCAmelCase				,     *_UpperCAmelCase				,     sampling_rate=_UpperCAmelCase				,     **_UpperCAmelCase     )
     if text is not None:
      lowerCamelCase__  =     self.tokenizer(_UpperCAmelCase				,     **_UpperCAmelCase     )

     if text is None:
      return inputs

     elif audio is None:
      return encodings
     else:
      lowerCamelCase__  =     encodings['''input_ids''']
      return inputs

    def    a__				(					self     :     List[Any]				,     *__lowerCamelCase     :     List[Any]				,     **__lowerCamelCase     :     Tuple     )							->							Union[str, Any]:

     '''simple docstring'''




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

    def    a__				(					self     :     List[Any]				,     *__lowerCamelCase     :     Dict				,     **__lowerCamelCase     :     Optional[int]     )							->							Tuple:

     '''simple docstring'''




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




    def    a__				(					self     :     List[Any]				,     __lowerCamelCase     :     List[Any]				,     __lowerCamelCase     :     Dict="np"     )							->							List[str]:

     '''simple docstring'''




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









'''simple docstring'''





def    lowerCamelCase_     (    lowercase__				,     lowercase__				,     lowercase__):
 return round(float(moles / volume) * nfactor)






def    lowerCamelCase_     (    lowercase__				,     lowercase__				,     lowercase__):
 return round(float((moles * 0.0_821 * temperature) / (volume)))






def    lowerCamelCase_     (    lowercase__				,     lowercase__				,     lowercase__):
 return round(float((moles * 0.0_821 * temperature) / (pressure)))






def    lowerCamelCase_     (    lowercase__				,     lowercase__				,     lowercase__):
 return round(float((pressure * volume) / (0.0_821 * moles)))


if __name__ == "__main__":
 import doctest

 doctest.testmod()

