

from typing import Optional

from .. import Features, NamedSplit
from ..packaged_modules.text.text import Text
from ..utils.typing import NestedDataStructureLike, PathLike
from .abc import AbstractDatasetReader






class  UpperCAmelCase__	( A__ ):






  """simple docstring"""


  def __init__(							self		:	Optional[Any]			,     __lowerCamelCase		:	NestedDataStructureLike[PathLike]			,     __lowerCamelCase		:	Optional[NamedSplit] = None			,     __lowerCamelCase		:	Optional[Features] = None			,     __lowerCamelCase		:	str = None			,     __lowerCamelCase		:	bool = False			,     __lowerCamelCase		:	bool = False			,     __lowerCamelCase		:	Optional[int] = None			,     **__lowerCamelCase		:	str			,     )	->							int:
       super().__init__(
           __lowerCamelCase			,     split=__lowerCamelCase			,     features=__lowerCamelCase			,     cache_dir=__lowerCamelCase			,     keep_in_memory=__lowerCamelCase			,     streaming=__lowerCamelCase			,     num_proc=__lowerCamelCase			,     **__lowerCamelCase			,     )
       SCREAMING_SNAKE_CASE__			=					path_or_paths if isinstance(__lowerCamelCase			,     __lowerCamelCase      ) else {self.split: path_or_paths}
       SCREAMING_SNAKE_CASE__			=					Text(
           cache_dir=__lowerCamelCase			,     data_files=__lowerCamelCase			,     features=__lowerCamelCase			,     **__lowerCamelCase			,     )







  def    lowercase_	(							self		:	str      )	->							int:
       # Build iterable dataset
       if self.streaming:
            SCREAMING_SNAKE_CASE__			=					self.builder.as_streaming_dataset(split=self.split      )
       # Build regular (map-style) dataset
       else:
            SCREAMING_SNAKE_CASE__			=					None
            SCREAMING_SNAKE_CASE__			=					None
            SCREAMING_SNAKE_CASE__			=					None
            SCREAMING_SNAKE_CASE__			=					None

            self.builder.download_and_prepare(
                download_config=__lowerCamelCase			,     download_mode=__lowerCamelCase			,     verification_mode=__lowerCamelCase			,     base_path=__lowerCamelCase			,     num_proc=self.num_proc			,     )
            SCREAMING_SNAKE_CASE__			=					self.builder.as_dataset(
                split=self.split			,     verification_mode=__lowerCamelCase			,     in_memory=self.keep_in_memory      )
       return dataset





from typing import List

import datasets
from datasets.tasks import AudioClassification

from ..folder_based_builder import folder_based_builder


_SCREAMING_SNAKE_CASE  :						Optional[Any]         =    datasets.utils.logging.get_logger(__name__)






class  UpperCAmelCase__	( folder_based_builder.FolderBasedBuilderConfig ):






  """simple docstring"""


  a     =      None
  a     =      None






class  UpperCAmelCase__	( folder_based_builder.FolderBasedBuilder ):






  """simple docstring"""


  a     =      datasets.Audio()
  a     =      "audio"
  a     =      AudioFolderConfig
  a     =      42  # definition at the bottom of the script
  a     =      AudioClassification(audio_column="audio"		,  label_column="label" )



_SCREAMING_SNAKE_CASE  :						str         =    [
    '''.aiff''',
    '''.au''',
    '''.avr''',
    '''.caf''',
    '''.flac''',
    '''.htk''',
    '''.svx''',
    '''.mat4''',
    '''.mat5''',
    '''.mpc2k''',
    '''.ogg''',
    '''.paf''',
    '''.pvf''',
    '''.raw''',
    '''.rf64''',
    '''.sd2''',
    '''.sds''',
    '''.ircam''',
    '''.voc''',
    '''.w64''',
    '''.wav''',
    '''.nist''',
    '''.wavex''',
    '''.wve''',
    '''.xi''',
    '''.mp3''',
    '''.opus''',
]
_SCREAMING_SNAKE_CASE  :						List[Any]         =    AUDIO_EXTENSIONS


