class_docstr: Wrapper class for loading HuggingFace IterableDataset for a char-based ASR model
class_docstr_tok: ["Wrapper","class","for","loading","HuggingFace","IterableDataset","for","a","char-based","ASR","model"]
code: def __init__(
      self,
      labels: List[str],
      audio_key: str,
      text_key: str,
      sample_rate_key: str,
      hf_data_cfg: DictConfig,
      sample_rate: int,
      augmentor: "nemo.collections.asr.parts.perturb.AudioAugmentor" = None,
      trim: bool = False,
      bos_id: int | None = None,
      eos_id: int | None = None,
      pad_id: int = 0,
      return_sample_id: bool = False,
      id_key: str | None = None,
      channel_selector: ChannelSelectorType | None = None,
      normalize_db: float | None = None,
      ref_channel: int | None = None,
      global_rank: int = 0,
      world_size: int = 0,
      shuffle_n: int = 0,
      shuffle_seed: Optional[int] = None,
      parser: Union[str, Callable] = "en",
      blank_index: int = -1,
      unk_index: int = -1,
      normalize: bool = True,
      normalize_text: bool = False,
      symbols_to_keep: Optional[str] = None,
  ) -> None:
      self.labels = labels
  
      parser = parsers.make_parser(
          labels=labels,
          name=parser,
          unk_id=unk_index,
          blank_id=blank_index,
          do_normalize=normalize,
      )
  
      super().__init__(
          audio_key=audio_key,
          text_key=text_key,
          sample_rate_key=sample_rate_key,
          hf_data_cfg=hf_data_cfg,
          parser=parser,
          sample_rate=sample_rate,
          augmentor=augmentor,
          trim=trim,
          bos_id=bos_id,
          eos_id=eos_id,
          pad_id=pad_id,
          return_sample_id=return_sample_id,
          id_key=id_key,
          channel_selector=channel_selector,
          normalize_db=normalize_db,
          ref_channel=ref_channel,
          global_rank=global_rank,
          world_size=world_size,
          shuffle_n=shuffle_n,
          shuffle_seed=shuffle_seed,
          normalize_text=normalize_text,
          symbols_to_keep=symbols_to_keep,
      )
  
imports: from typing import Callable, Dict, List, Optional, Tuple, Union
  import datasets
  import torch
  from datasets import concatenate_datasets
  from datasets.distributed import split_dataset_by_node
  from omegaconf import DictConfig, ListConfig, open_dict
  from nemo.collections.asr.data.audio_to_text import _speech_collate_fn
  from nemo.collections.asr.parts.preprocessing.perturb import AudioAugmentor
  from nemo.collections.asr.parts.preprocessing.segment import AudioSegment
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.collections.common import tokenizers
  from nemo.collections.common.parts.preprocessing import parsers
  from nemo.core.classes import Dataset, IterableDataset
  from nemo.core.neural_types import AudioSignal, LabelsType, LengthsType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 2 to create a new HFIterableAudioToCharDataset object from inherited base classes: _HFIterableAudioTextDataset with example: obj = HFIterableAudioToCharDataset(labels, audio_key, text_key, sample_rate_key, hf_data_cfg, sample_rate, augmentor, trim, bos_id, eos_id, pad_id, return_sample_id, id_key, channel_selector, normalize_db, ref_channel, global_rank, world_size, shuffle_n, shuffle_seed, parser, blank_index, unk_index, normalize, normalize_text, symbols_to_keep)