


"""simple docstring"""
from ..utils import DummyObject, requires_backends





class      __A     (metaclass=snake_case__):





							'''simple docstring'''

							__lowercase:		str							      =    ["""torch""", """transformers""", """onnx"""]



							def __init__(				self							:      Union[str, Any]		,       *UpperCAmelCase_							:      str		,       **UpperCAmelCase_							:      Tuple       )					->Optional[int]:



														"""simple docstring"""



														requires_backends(self		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      Optional[int]		,       *UpperCAmelCase_							:      Any		,       **UpperCAmelCase_							:      List[Any]       )					->Optional[int]:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      Optional[int]		,       *UpperCAmelCase_							:      List[str]		,       **UpperCAmelCase_							:      Union[str, Any]       )					->Optional[Any]:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )





class      __A     (metaclass=snake_case__):





							'''simple docstring'''

							__lowercase:		List[Any]							      =    ["""torch""", """transformers""", """onnx"""]



							def __init__(				self							:      Any		,       *UpperCAmelCase_							:      Optional[Any]		,       **UpperCAmelCase_							:      int       )					->int:



														"""simple docstring"""



														requires_backends(self		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      str		,       *UpperCAmelCase_							:      int		,       **UpperCAmelCase_							:      int       )					->List[Any]:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      Union[str, Any]		,       *UpperCAmelCase_							:      Tuple		,       **UpperCAmelCase_							:      Optional[Any]       )					->List[str]:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )





class      __A     (metaclass=snake_case__):





							'''simple docstring'''

							__lowercase:		Optional[Any]							      =    ["""torch""", """transformers""", """onnx"""]



							def __init__(				self							:      Tuple		,       *UpperCAmelCase_							:      str		,       **UpperCAmelCase_							:      str       )					->str:



														"""simple docstring"""



														requires_backends(self		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      Union[str, Any]		,       *UpperCAmelCase_							:      Tuple		,       **UpperCAmelCase_							:      Union[str, Any]       )					->List[str]:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      List[Any]		,       *UpperCAmelCase_							:      List[str]		,       **UpperCAmelCase_							:      Tuple       )					->Union[str, Any]:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )





class      __A     (metaclass=snake_case__):





							'''simple docstring'''

							__lowercase:		Optional[int]							      =    ["""torch""", """transformers""", """onnx"""]



							def __init__(				self							:      int		,       *UpperCAmelCase_							:      Optional[int]		,       **UpperCAmelCase_							:      List[Any]       )					->Tuple:



														"""simple docstring"""



														requires_backends(self		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      List[str]		,       *UpperCAmelCase_							:      List[Any]		,       **UpperCAmelCase_							:      List[Any]       )					->Tuple:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      List[Any]		,       *UpperCAmelCase_							:      Union[str, Any]		,       **UpperCAmelCase_							:      str       )					->Optional[Any]:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )





class      __A     (metaclass=snake_case__):





							'''simple docstring'''

							__lowercase:		Any							      =    ["""torch""", """transformers""", """onnx"""]



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



														"""simple docstring"""



														requires_backends(self		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      List[str]		,       *UpperCAmelCase_							:      Dict		,       **UpperCAmelCase_							:      Union[str, Any]       )					->Dict:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      List[Any]		,       *UpperCAmelCase_							:      int		,       **UpperCAmelCase_							:      Any       )					->List[Any]:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )





class      __A     (metaclass=snake_case__):





							'''simple docstring'''

							__lowercase:		int							      =    ["""torch""", """transformers""", """onnx"""]



							def __init__(				self							:      Any		,       *UpperCAmelCase_							:      Union[str, Any]		,       **UpperCAmelCase_							:      Tuple       )					->Any:



														"""simple docstring"""



														requires_backends(self		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      int		,       *UpperCAmelCase_							:      List[Any]		,       **UpperCAmelCase_							:      Tuple       )					->Tuple:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )



							@classmethod
							def 		lowerCAmelCase       (				cls							:      List[str]		,       *UpperCAmelCase_							:      Any		,       **UpperCAmelCase_							:      Tuple       )					->Any:



														"""simple docstring"""



														requires_backends(cls		,       ["""torch""", """transformers""", """onnx"""]       )







"""simple docstring"""
import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Audio, Features, Value
from .base import TaskTemplate





@dataclass(frozen=snake_case__)
class      __A     (snake_case__):





							'''simple docstring'''

							__lowercase:		str							      =    field(default="""automatic-speech-recognition"""						,		metadata={"""include_in_asdict_even_if_is_default""": True})
							__lowercase:		ClassVar[Features]							      =    Features({"""audio""": Audio()})
							__lowercase:		ClassVar[Features]							      =    Features({"""transcription""": Value("""string""")})
							__lowercase:		str							      =    "audio"
							__lowercase:		str							      =    "transcription"



							def 		lowerCAmelCase       (				self							:      List[Any]		,       UpperCAmelCase_							:      Any       )					->int:



														"""simple docstring"""



														if self.audio_column not in features:
																					raise ValueError(F"""Column {self.audio_column} is not present in features."""       )
														if not isinstance(features[self.audio_column]		,       UpperCAmelCase_       ):
																					raise ValueError(F"""Column {self.audio_column} is not an Audio type."""       )
														snake_case_           =		copy.deepcopy(self       )
														snake_case_           =		self.input_schema.copy()
														snake_case_           =		features[self.audio_column]
														snake_case_           =		input_schema
														return task_template



							@property
							def 		lowerCAmelCase       (				self							:      List[str]       )					->Dict[str, str]:



														"""simple docstring"""



														return {self.audio_column: "audio", self.transcription_column: "transcription"}



