
import copy
from dataclasses import dataclass, field
from typing import ClassVar, Dict

from ..features import Audio, Features, Value
from .base import TaskTemplate
@dataclass(frozen=__magic_name__							)
class       _lowerCAmelCase  (		__magic_name__							):

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

 def      __lowerCAmelCase  (						self			:			List[Any]					, SCREAMING_SNAKE_CASE__			:			Any   ):






      """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]					, SCREAMING_SNAKE_CASE__   ):
           raise ValueError(F'Column {self.audio_column} is not an Audio type.'   )
      UpperCamelCase						    =					copy.deepcopy(self   )
      UpperCamelCase						    =					self.input_schema.copy()
      UpperCamelCase						    =					features[self.audio_column]
      UpperCamelCase						    =					input_schema
      return task_template






 @property
 def      __lowerCAmelCase  (						self			:			Union[str, Any]   ):






      """simple docstring"""



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




from functools import lru_cache

@lru_cache
def  __lowerCamelCase					( _lowercase			)       ->      int:
     if num < 0:
          raise ValueError('Number should not be negative.'			)

     return 1 if num in (0, 1) else num * factorial(num - 1			)


if __name__ == "__main__":
 import doctest

 doctest.testmod()


