class_docstr: Dataset that loads tensors via a json file containing paths to audio feature
  files, transcripts, durations (in seconds) and optional RTTM files. Each new line is a different sample. 
  Example below:
  {"audio_filepath": "/path/to/audio.wav", "text_filepath":
  "/path/to/audio.txt", "duration": 23.147, "rttm_filepath": "/path/to/audio_rttm.rttm",}
  ...
  {"audio_filepath": "/path/to/audio.wav", "text": "the
  transcription", "offset": 301.75, "duration": 0.82, "utt":
  "utterance_id", "ctm_utt": "en_4156", "side": "A"}
  
  In practice, the dataset and manifest used for character encoding and byte pair encoding
  are exactly the same. The only difference lies in how the dataset tokenizes the text in
  the manifest.
  
  Args:
      manifest_filepath (str): Path to manifest json as described above. Can
          be comma-separated paths.
      tokenizer: A subclass of the Tokenizer wrapper found in the common collection,
          nemo.collections.common.tokenizers.TokenizerSpec. ASR Models support a subset of
          all available tokenizers.
      normalize (str): how to normalize feature, must be one of [None, "post_norm", "pre_norm"]
      normalize_type (Union[str, dict]): how to normalize feature, see `nemo.collections.asr.parts.preprocessing.features.normalize_batch`
      use_rttm (bool): whether to use RTTM files if there is any, default to False
      rttm_mode (str): how to use RTTM files, must be one of ['mask', 'drop'], default to 'mask'
      feat_min_len (int): minimum length of feature, default to 4
      feat_mask_val (Optional[float]): value used to mask features with RTTM files, default to None to use zero mel-spectralgram
      frame_unit_time_secs: time in seconds for each frame
      sample_rate (int): Sample rate to resample loaded audio to
      int_values (bool): If true, load samples as 32-bit integers. Defauts to False.
      augmentor (nemo.collections.asr.parts.perturb.AudioAugmentor): An AudioAugmentor
          object used to augment loaded audio
      max_duration: If audio exceeds this length, do not include in dataset
      min_duration: If audio is less than this length, do not include
          in dataset
      max_utts: Limit number of utterances
      trim: Whether to trim silence segments
      use_start_end_token: Boolean which dictates whether to add [BOS] and [EOS]
          tokens to beginning and ending of speech respectively.
      return_sample_id (bool): whether to return the sample_id as a part of each sample
      channel_selector (int | Iterable[int] | str): select a single channel or a subset of channels from multi-channel audio. If set to `'average'`, it performs averaging across channels. Disabled if set to `None`. Defaults to `None`. Uses zero-based indexing.
code: def __init__(
      self,
      manifest_filepath: str,
      tokenizer: "nemo.collections.common.tokenizers.TokenizerSpec",
      normalize: Optional[str] = "post_norm",
      normalize_type: Union[str, dict] = "per_feature",
      use_rttm: bool = False,
      rttm_mode: str = "mask",
      feat_min_len: int = 4,
      feat_mask_val: Optional[float] = None,
      frame_unit_time_secs: float = 0.01,
      sample_rate: Optional[int] = 16000,
      augmentor: "nemo.collections.asr.parts.perturb.FeatureAugmentor" = None,
      max_duration: Optional[int] = None,
      min_duration: Optional[int] = None,
      max_utts: int = 0,
      use_start_end_token: bool = True,
      trim: bool = False,
      return_sample_id: bool = False,
      channel_selector: Optional[ChannelSelectorType] = None,
  ):
      if (
          use_start_end_token
          and hasattr(tokenizer, "bos_id")
          and tokenizer.bos_id > 0
      ):
          bos_id = tokenizer.bos_id
      else:
          bos_id = None
  
      if (
          use_start_end_token
          and hasattr(tokenizer, "eos_id")
          and tokenizer.eos_id > 0
      ):
          eos_id = tokenizer.eos_id
      else:
          eos_id = None
  
      if hasattr(tokenizer, "pad_id") and tokenizer.pad_id > 0:
          pad_id = tokenizer.pad_id
      else:
          pad_id = 0
  
      class TokenizerWrapper:
          def __init__(self, tokenizer):
              if isinstance(
                  tokenizer,
                  tokenizers.aggregate_tokenizer.AggregateTokenizer,
              ):
                  self.is_aggregate = True
              else:
                  self.is_aggregate = False
              self._tokenizer = tokenizer
  
          def __call__(self, *args):
              if isinstance(args[0], List) and self.is_aggregate:
                  t = []
                  for span in args[0]:
                      t.extend(
                          self._tokenizer.text_to_ids(
                              span["str"], span["lang"]
                          )
                      )
                  return t
  
              t = self._tokenizer.text_to_ids(*args)
              return t
  
      super().__init__(
          manifest_filepath=manifest_filepath,
          parser=TokenizerWrapper(tokenizer),
          normalize=normalize,
          normalize_type=normalize_type,
          use_rttm=use_rttm,
          rttm_mode=rttm_mode,
          feat_min_len=feat_min_len,
          feat_mask_val=feat_mask_val,
          frame_unit_time_secs=frame_unit_time_secs,
          sample_rate=sample_rate,
          augmentor=augmentor,
          max_duration=max_duration,
          min_duration=min_duration,
          max_utts=max_utts,
          trim=trim,
          bos_id=bos_id,
          eos_id=eos_id,
          pad_id=pad_id,
          return_sample_id=return_sample_id,
          channel_selector=channel_selector,
      )
  
imports: from typing import Callable, Dict, List, Optional, Tuple, Union
  import torch
  from nemo.collections.asr.data.feature_to_label import _audio_feature_collate_fn
  from nemo.collections.asr.parts.preprocessing.feature_loader import ExternalFeatureLoader
  from nemo.collections.asr.parts.preprocessing.features import normalize_batch
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.collections.asr.parts.utils.vad_utils import load_speech_segments_from_rttm
  from nemo.collections.common import tokenizers
  from nemo.collections.common.parts.preprocessing import collections, parsers
  from nemo.core.classes import Dataset
  from nemo.core.neural_types import AcousticEncodedRepresentation, LabelsType, LengthsType, NeuralType
label_desc: Use image node_id 1 to create a new FeatureToBPEDataset object from inherited base classes: _FeatureTextDataset with example: obj = FeatureToBPEDataset(manifest_filepath, tokenizer, normalize, normalize_type, use_rttm, rttm_mode, feat_min_len, feat_mask_val, frame_unit_time_secs, sample_rate, augmentor, max_duration, min_duration, max_utts, use_start_end_token, trim, return_sample_id, channel_selector)