


import os
from distutils.util import strtobool


def 		lowercase_	(  _UpperCamelCase							,      _UpperCamelCase	):


			'''simple docstring'''







			for e in env_keys:
						__lowercase			       = int(os.environ.get(_UpperCamelCase							,      -1	)	)
						if val >= 0:
									return val
			return default


def 		lowercase_	(  _UpperCamelCase							,      _UpperCamelCase=False	):


			'''simple docstring'''







			__lowercase			       = os.environ.get(_UpperCamelCase							,      str(_UpperCamelCase	)	)
			return strtobool(_UpperCamelCase	) == 1  # As its name indicates `strtobool` actually returns an int...





def 		lowercase_	(  _UpperCamelCase							,      _UpperCamelCase="no"	):


			'''simple docstring'''







			__lowercase			       = os.environ.get(_UpperCamelCase							,      str(_UpperCamelCase	)	)
			return value






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

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



					'''simple docstring'''







					__UpperCAmelCase							  =					field(default="automatic-speech-recognition"  ,  metadata={"include_in_asdict_even_if_is_default": True}					)
					__UpperCAmelCase							  =					Features({"audio": Audio()}					)
					__UpperCAmelCase							  =					Features({"transcription": Value("string"					)}					)
					__UpperCAmelCase							  =					"audio"
					__UpperCAmelCase							  =					"transcription"






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






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







								'''simple docstring'''

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


