class_docstr: Pytorch Dataset class for ESPNet.
  
  Examples:
      >>> dataset = IterableESPnetDataset([('wav.scp', 'input', 'sound'),
      ...                                  ('token_int', 'output', 'text_int')],
      ...                                )
      >>> for uid, data in dataset:
      ...     data
      {'input': per_utt_array, 'output': per_utt_array}
class_docstr_tok: ["Pytorch","Dataset","class","for","ESPNet",".","Examples",":",">",">",">","dataset","=","IterableESPnetDataset","(","[","(","'wav.scp","'",",","'input","'",",","'sound","'",")",",","...","(","'token_int","'",",","'output","'",",","'text_int","'",")","]",",","...",")",">",">",">","for","uid",",","data","in","dataset",":","...","data","{","'input","'",":","per_utt_array",",","'output","'",":","per_utt_array","}"]
code: def __init__(
      self,
      path_name_type_list: Collection[Tuple[str, str, str]],
      preprocess: Callable[
          [str, Dict[str, np.ndarray]], Dict[str, np.ndarray]
      ] = None,
      float_dtype: str = "float32",
      int_dtype: str = "long",
      key_file: str = None,
  ):
      assert check_argument_types()
      if len(path_name_type_list) == 0:
          raise ValueError(
              '1 or more elements are required for "path_name_type_list"'
          )
  
      path_name_type_list = copy.deepcopy(path_name_type_list)
      self.preprocess = preprocess
  
      self.float_dtype = float_dtype
      self.int_dtype = int_dtype
      self.key_file = key_file
  
      self.debug_info = {}
      non_iterable_list = []
      self.path_name_type_list = []
  
      for path, name, _type in path_name_type_list:
          if name in self.debug_info:
              raise RuntimeError(f'"{name}" is duplicated for data-key')
          self.debug_info[name] = path, _type
          if _type not in DATA_TYPES:
              non_iterable_list.append((path, name, _type))
          else:
              self.path_name_type_list.append((path, name, _type))
  
      if len(non_iterable_list) != 0:
          # Some types doesn't support iterable mode
          self.non_iterable_dataset = ESPnetDataset(
              path_name_type_list=non_iterable_list,
              preprocess=preprocess,
              float_dtype=float_dtype,
              int_dtype=int_dtype,
          )
      else:
          self.non_iterable_dataset = None
  
      if Path(
          Path(path_name_type_list[0][0]).parent, "utt2category"
      ).exists():
          self.apply_utt2category = True
      else:
          self.apply_utt2category = False
  
file_path: espnet/espnet2/train/iterable_dataset.py
imports: import copy
  from io import StringIO
  from pathlib import Path
  from typing import Callable, Collection, Dict, Iterator, Tuple, Union
  import kaldiio
  import numpy
  import soundfile
  import torch
  from torch.utils.data.dataset import IterableDataset
  from typeguard import check_argument_types
  from espnet2.train.dataset import ESPnetDataset
label_desc: Use image node_id 1 to create a new IterableESPnetDataset object from inherited base classes: IterableDataset with example: obj = IterableESPnetDataset(path_name_type_list, preprocess, float_dtype, int_dtype, key_file)