




from ...processing_utils import ProcessorMixin







class 						lowercase							(   UpperCamelCase__		):
     _a							 =						"WhisperFeatureExtractor"
     _a							 =						"WhisperTokenizer"

     def __init__(  self		,     _a		,     _a				)						->							str:
           super().__init__(_a		,     _a				)
           _A							:     Dict			=						self.feature_extractor
           _A							:     List[Any]			=						False

     def 					a__	(  self		,     _a=None		,     _a=None		,     _a=True				)						->							List[str]:
           return self.tokenizer.get_decoder_prompt_ids(task=_a		,     language=_a		,     no_timestamps=_a				)

     def __call__(  self		,     *_a		,     **_a				)						->							List[str]:
           # For backward compatibility
           if self._in_target_context_manager:
                 return self.current_processor(*_a		,     **_a				)

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

           if text is None:
                 return inputs

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

     def 					a__	(  self		,     *_a		,     **_a				)						->							Any:
           return self.tokenizer.batch_decode(*_a		,     **_a				)

     def 					a__	(  self		,     *_a		,     **_a				)						->							int:
           return self.tokenizer.decode(*_a		,     **_a				)



     def 					a__	(  self		,     _a		,     _a="np"				)						->							Optional[int]:
           return self.tokenizer.get_prompt_ids(_a		,     return_tensors=_a				)









"""simple docstring"""





from math import pow, sqrt







def      lowerCamelCase__       (							*_lowerCamelCase       :		float )      ->				bool:
  lowerCamelCase_         =						len(_lowerCamelCase ) > 0 and all(value > 0.0 for value in values )
  return result







def      lowerCamelCase__       (							_lowerCamelCase       :		float		,				_lowerCamelCase       :		float )      ->				float | ValueError:
  return (
      round(sqrt(molar_mass_a / molar_mass_a )		,				6 )
      if validate(_lowerCamelCase		,				_lowerCamelCase )
      else ValueError('Input Error: Molar mass values must greater than 0.' )
  )







def      lowerCamelCase__       (							_lowerCamelCase       :		float		,				_lowerCamelCase       :		float		,				_lowerCamelCase       :		float )      ->				float | ValueError:
  return (
      round(effusion_rate * sqrt(molar_mass_a / molar_mass_a )		,				6 )
      if validate(_lowerCamelCase		,				_lowerCamelCase		,				_lowerCamelCase )
      else ValueError(
          'Input Error: Molar mass and effusion rate values must greater than 0.' )
  )







def      lowerCamelCase__       (							_lowerCamelCase       :		float		,				_lowerCamelCase       :		float		,				_lowerCamelCase       :		float )      ->				float | ValueError:
  return (
      round(effusion_rate / sqrt(molar_mass_a / molar_mass_a )		,				6 )
      if validate(_lowerCamelCase		,				_lowerCamelCase		,				_lowerCamelCase )
      else ValueError(
          'Input Error: Molar mass and effusion rate values must greater than 0.' )
  )







def      lowerCamelCase__       (							_lowerCamelCase       :		float		,				_lowerCamelCase       :		float		,				_lowerCamelCase       :		float )      ->				float | ValueError:
  return (
      round(molar_mass / pow(effusion_rate_a / effusion_rate_a		,				2 )		,				6 )
      if validate(_lowerCamelCase		,				_lowerCamelCase		,				_lowerCamelCase )
      else ValueError(
          'Input Error: Molar mass and effusion rate values must greater than 0.' )
  )







def      lowerCamelCase__       (							_lowerCamelCase       :		float		,				_lowerCamelCase       :		float		,				_lowerCamelCase       :		float )      ->				float | ValueError:
  return (
      round(pow(effusion_rate_a / effusion_rate_a		,				2 ) / molar_mass		,				6 )
      if validate(_lowerCamelCase		,				_lowerCamelCase		,				_lowerCamelCase )
      else ValueError(
          'Input Error: Molar mass and effusion rate values must greater than 0.' )
  )




