





'''simple docstring'''






from typing import Callable, Optional

from .. import Features
from ..packaged_modules.generator.generator import Generator
from .abc import AbstractDatasetInputStream







class 			lowerCamelCase					(						__lowerCAmelCase  ):


					def __init__(					self	:  Dict       ,     __snake_case	:  Callable       ,     __snake_case	:  Optional[Features] = None       ,     __snake_case	:  str = None       ,     __snake_case	:  bool = False       ,     __snake_case	:  bool = False       ,     __snake_case	:  Optional[dict] = None       ,     __snake_case	:  Optional[int] = None       ,     **__snake_case	:  Dict       ,     ):





											'''simple docstring'''





											super().__init__(
											    features=lowerCamelCase__       ,     cache_dir=lowerCamelCase__       ,     keep_in_memory=lowerCamelCase__       ,     streaming=lowerCamelCase__       ,     num_proc=lowerCamelCase__       ,     **lowerCamelCase__       ,     )
											_snake_case:   Union[str, Any]  					=		Generator(
											    cache_dir=lowerCamelCase__       ,     features=lowerCamelCase__       ,     generator=lowerCamelCase__       ,     gen_kwargs=lowerCamelCase__       ,     **lowerCamelCase__       ,     )




					def    SCREAMING_SNAKE_CASE_		(					self	:  Optional[int]       ):





											'''simple docstring'''





											if self.streaming:
																	_snake_case:   Union[str, Any]  					=		self.builder.as_streaming_dataset(split='train'       )
											# Build regular (map-style) dataset
											else:
																	_snake_case:   Union[str, Any]  					=		None
																	_snake_case:   str  					=		None
																	_snake_case:   Optional[Any]  					=		None
																	_snake_case:   int  					=		None

																	self.builder.download_and_prepare(
																	    download_config=lowerCamelCase__       ,     download_mode=lowerCamelCase__       ,     verification_mode=lowerCamelCase__       ,     base_path=lowerCamelCase__       ,     num_proc=self.num_proc       ,     )
																	_snake_case:   List[str]  					=		self.builder.as_dataset(
																	    split='train'       ,     verification_mode=lowerCamelCase__       ,     in_memory=self.keep_in_memory       )
											return dataset






'''simple docstring'''






from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_flax_available, is_torch_available


A   : Dict             =			{'configuration_speech_encoder_decoder': ['SpeechEncoderDecoderConfig']}

try:
		if not is_torch_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A   : int             =			['SpeechEncoderDecoderModel']

try:
		if not is_flax_available():
				raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
		pass
else:
		A   : Union[str, Any]             =			['FlaxSpeechEncoderDecoderModel']

if TYPE_CHECKING:
		from .configuration_speech_encoder_decoder import SpeechEncoderDecoderConfig

		try:
				if not is_torch_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_speech_encoder_decoder import SpeechEncoderDecoderModel

		try:
				if not is_flax_available():
						raise OptionalDependencyNotAvailable()
		except OptionalDependencyNotAvailable:
				pass
		else:
				from .modeling_flax_speech_encoder_decoder import FlaxSpeechEncoderDecoderModel

else:
		import sys

		A   : int             =			_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





