
from .data_collator import (
    DataCollatorForLanguageModeling,
    DataCollatorForPermutationLanguageModeling,
    DataCollatorForSeqaSeq,
    DataCollatorForSOP,
    DataCollatorForTokenClassification,
    DataCollatorForWholeWordMask,
    DataCollatorWithPadding,
    DefaultDataCollator,
    default_data_collator,
)
from .metrics import glue_compute_metrics, xnli_compute_metrics
from .processors import (
    DataProcessor,
    InputExample,
    InputFeatures,
    SingleSentenceClassificationProcessor,
    SquadExample,
    SquadFeatures,
    SquadVaProcessor,
    SquadVaProcessor,
    glue_convert_examples_to_features,
    glue_output_modes,
    glue_processors,
    glue_tasks_num_labels,
    squad_convert_examples_to_features,
    xnli_output_modes,
    xnli_processors,
    xnli_tasks_num_labels,
)


from ...processing_utils import ProcessorMixin

class __snake_case		(				lowerCAmelCase					):
    _a		:						Union[str, Any]=    "WhisperFeatureExtractor"
    _a		:						int=    "WhisperTokenizer"
    def __init__(  self		,snake_case		,snake_case				):



           '''simple docstring'''







           super().__init__(snake_case		,snake_case				)
           lowercase							:					Optional[int]	     =				self.feature_extractor
           lowercase							:					Tuple	     =				False
    def 				_SCREAMING_SNAKE_CASE	(  self		,snake_case=None		,snake_case=None		,snake_case=True				):



           '''simple docstring'''







           return self.tokenizer.get_decoder_prompt_ids(task=snake_case		,language=snake_case		,no_timestamps=snake_case				)
    def __call__(  self		,*snake_case		,**snake_case				):



           '''simple docstring'''







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

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

           if text is None:
                  return inputs

           elif audio is None:
                  return encodings
           else:
                  lowercase							:					List[Any]	     =				encodings["""input_ids"""]
                  return inputs
    def 				_SCREAMING_SNAKE_CASE	(  self		,*snake_case		,**snake_case				):



           '''simple docstring'''







           return self.tokenizer.batch_decode(*snake_case		,**snake_case				)
    def 				_SCREAMING_SNAKE_CASE	(  self		,*snake_case		,**snake_case				):



           '''simple docstring'''







           return self.tokenizer.decode(*snake_case		,**snake_case				)
    def 				_SCREAMING_SNAKE_CASE	(  self		,snake_case		,snake_case="np"				):



           '''simple docstring'''







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