



'''simple docstring'''


import warnings
from contextlib import contextmanager

from ....processing_utils import ProcessorMixin




class      __UpperCamelCase       (_UpperCAmelCase			):
 __A			  =					'''MCTCTFeatureExtractor'''
 __A			  =					'''AutoTokenizer'''







 def __init__(    self ,				_lowerCAmelCase ,				_lowerCAmelCase						)    ->    Optional[Any]:
       '''simple docstring'''






       super().__init__(A__ ,				A__						)
       lowercase        =							self.feature_extractor
       lowercase        =							False







 def __call__(    self ,				*_lowerCAmelCase ,				**_lowerCAmelCase						)    ->    Optional[int]:
       '''simple docstring'''






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

       if "raw_speech" in kwargs:
             warnings.warn("""Using `raw_speech` as a keyword argument is deprecated. Use `audio` instead."""						)
             lowercase        =							kwargs.pop("""raw_speech"""						)
       else:
             lowercase        =							kwargs.pop("""audio""" ,				A__						)
       lowercase        =							kwargs.pop("""sampling_rate""" ,				A__						)
       lowercase        =							kwargs.pop("""text""" ,				A__						)
       if len(A__						) > 0:
             lowercase        =							args[0]
             lowercase        =							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        =							self.feature_extractor(A__ ,				*A__ ,				sampling_rate=A__ ,				**A__						)
       if text is not None:
             lowercase        =							self.tokenizer(A__ ,				**A__						)

       if text is None:
             return inputs
       elif audio is None:
             return encodings
       else:
             lowercase        =							encodings["""input_ids"""]
             return inputs







 def   _a   (    self ,				*_lowerCAmelCase ,				**_lowerCAmelCase						)    ->    int:
       '''simple docstring'''






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







 def   _a   (    self ,				*_lowerCAmelCase ,				**_lowerCAmelCase						)    ->    Optional[int]:
       '''simple docstring'''






       if self._in_target_context_manager:
             return self.current_processor.pad(*A__ ,				**A__						)

       lowercase        =							kwargs.pop("""input_features""" ,				A__						)
       lowercase        =							kwargs.pop("""labels""" ,				A__						)
       if len(A__						) > 0:
             lowercase        =							args[0]
             lowercase        =							args[1:]

       if input_features is not None:
             lowercase        =							self.feature_extractor.pad(A__ ,				*A__ ,				**A__						)
       if labels is not None:
             lowercase        =							self.tokenizer.pad(A__ ,				**A__						)

       if labels is None:
             return input_features
       elif input_features is None:
             return labels
       else:
             lowercase        =							labels["""input_ids"""]
             return input_features







 def   _a   (    self ,				*_lowerCAmelCase ,				**_lowerCAmelCase						)    ->    Tuple:
       '''simple docstring'''






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







 @contextmanager
 def   _a   (    self						)    ->    List[Any]:
       '''simple docstring'''






       warnings.warn(
           """`as_target_processor` is deprecated and will be removed in v5 of Transformers. You can process your """
           """labels by using the argument `text` of the regular `__call__` method (either in the same call as """
           """your audio inputs, or in a separate call."""						)
       lowercase        =							True
       lowercase        =							self.tokenizer
       yield
       lowercase        =							self.feature_extractor
       lowercase        =							False







'''simple docstring'''


import os







def      SCREAMING_SNAKE_CASE				(				):
						lowercase        =							os.path.join(os.path.dirname(lowercase_						) ,  """num.txt"""						)
						with open(lowercase_						) as file_hand:
												return str(sum(int(lowercase_						) for line in file_hand						)						)[:10]


if __name__ == "__main__":
						print(solution())


