



"""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=SCREAMING_SNAKE_CASE__		)
class  _lowerCAmelCase     (					SCREAMING_SNAKE_CASE__		):





		"""simple docstring"""






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





		def  UpperCAmelCase__				(       self				,     _lowercase )			->    Dict:







								'''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]				,     _lowercase ):
														raise ValueError(f'Column {self.audio_column} is not an Audio type.' )
								snake_case_ :			List[str]            =      copy.deepcopy(self )
								snake_case_ :			int            =      self.input_schema.copy()
								snake_case_ :			Tuple            =      features[self.audio_column]
								snake_case_ :			Any            =      input_schema
								return task_template





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







								'''simple docstring'''

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





from ...utils import (
    OptionalDependencyNotAvailable,
    is_torch_available,
    is_transformers_available,
    is_transformers_version,
)


try:
						if not (is_transformers_available() and is_torch_available()):
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ...utils.dummy_torch_and_transformers_objects import KandinskyPipeline, KandinskyPriorPipeline
else:
						from .pipeline_kandinsky import KandinskyPipeline
						from .pipeline_kandinsky_imgaimg import KandinskyImgaImgPipeline
						from .pipeline_kandinsky_inpaint import KandinskyInpaintPipeline
						from .pipeline_kandinsky_prior import KandinskyPriorPipeline, KandinskyPriorPipelineOutput
						from .text_encoder import MultilingualCLIP


