class_docstr: Wrapper class for loading HuggingFace IterableDataset and converts to NeMo compatible format. 
  Args:
      audio_key: key to access audio data from the dataset
      text_key: key to access text data from the dataset
      sample_rate_key: key to access sample rate data from the dataset
      hf_data_cfg: HuggingFace dataset config, all params in this config will be passed to `hf_datasets.load_dataset`
      parser: Str for a language specific preprocessor or a callable.
      augmentor: An instance of `nemo.collections.asr.parts.perturb.AudioAugmentor` to apply on audio.
      trim: If true, trims silence using `nemo.collections.asr.parts.preprocessing.segment.AudioSegment`
      bos_id: BOS token id to add to the beginning of the transcript.
      eos_id: EOS token id to add to the end of the transcript.
      pad_id: PAD token id to pad transcripts to the same length.
      return_sample_id: If true, returns sample id from the dataset.
      channel_selector: ChannelSelectorType, which channel(s) to use for audio.
      normalize_db: Target RMS value for audio normalization.
      ref_channel: Reference channel for normalization.
      id_key: key to access sample id from the dataset
      global_rank: global rank of the current worker
      world_size: total number of workers
      shuffle_n: buffer size for shuffling
      shuffle_seed: seed for shuffling
      normalize_text: If true, normalizes text in HFTextProcessor
      symbols_to_keep: If not None, only keeps symbols in this list when normalizing text
class_docstr_tok: ["Wrapper","class","for","loading","HuggingFace","IterableDataset","and","converts","to","NeMo","compatible","format",".","Args",":","audio_key",":","key","to","access","audio","data","from","the","dataset","text_key",":","key","to","access","text","data","from","the","dataset","sample_rate_key",":","key","to","access","sample","rate","data","from","the","dataset","hf_data_cfg",":","HuggingFace","dataset","config",",","all","params","in","this","config","will","be","passed","to","`","hf_datasets.load_dataset","`","parser",":","Str","for","a","language","specific","preprocessor","or","a","callable",".","augmentor",":","An","instance","of","`","nemo.collections.asr.parts.perturb.AudioAugmentor","`","to","apply","on","audio",".","trim",":","If","true",",","trims","silence","using","`","nemo.collections.asr.parts.preprocessing.segment.AudioSegment","`","bos_id",":","BOS","token","id","to","add","to","the","beginning","of","the","transcript",".","eos_id",":","EOS","token","id","to","add","to","the","end","of","the","transcript",".","pad_id",":","PAD","token","id","to","pad","transcripts","to","the","same","length",".","return_sample_id",":","If","true",",","returns","sample","id","from","the","dataset",".","channel_selector",":","ChannelSelectorType",",","which","channel","(","s",")","to","use","for","audio",".","normalize_db",":","Target","RMS","value","for","audio","normalization",".","ref_channel",":","Reference","channel","for","normalization",".","id_key",":","key","to","access","sample","id","from","the","dataset","global_rank",":","global","rank","of","the","current","worker","world_size",":","total","number","of","workers","shuffle_n",":","buffer","size","for","shuffling","shuffle_seed",":","seed","for","shuffling","normalize_text",":","If","true",",","normalizes","text","in","HFTextProcessor","symbols_to_keep",":","If","not","None",",","only","keeps","symbols","in","this","list","when","normalizing","text"]
code: def _build_sample(self, sample):
      audio_array = get_nested_dict_value(sample, self.audio_key)
      origin_sr = get_nested_dict_value(sample, self.sample_rate_key)
      audio_segment = AudioSegment(
          samples=audio_array,
          sample_rate=origin_sr,
          target_sr=self.sample_rate,
          trim=self.trim,
          channel_selector=self.channel_selector,
          normalize_db=self.normalize_db,
          ref_channel=self.ref_channel,
      )
      self.augmentor.perturb(audio_segment)
      f = torch.tensor(audio_segment.samples, dtype=torch.float)
      fl = torch.tensor(f.shape[0], dtype=torch.long)
  
      text = get_nested_dict_value(sample, self.text_key)
      t, tl = self.text_processor.process_text(text)
  
      output = {
          "audio_signal": f,
          "a_sig_length": fl,
          "transcripts": torch.tensor(t).long(),
          "transcript_length": torch.tensor(tl).long(),
      }
  
      if self.return_sample_id:
          output["sample_id"] = get_nested_dict_value(
              sample, self.id_key
          )
      return output
  
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 5 for calling the _HFIterableAudioTextDataset obj's underlying member method code with example usage: obj._build_sample(sample) and returns: output