class_docstr: Dataset that loads a json file containing paths to audio files, durations (in seconds), and a sequence of labels.
  Each new line is a different sample. Example below:
  {"audio_filepath": "/path/to/audio_wav_0.wav", "duration": time_in_sec_0, "label":         "0 1 1 0 1", "offset": offset_in_sec_0}
  ...
  {"audio_filepath": "/path/to/audio_wav_n.wav", "duration": time_in_sec_n, "label":         "0 1 0 0 1", "offset": offset_in_sec_n}
  Args:
      manifest_filepath (Union[str, List[str]]): Path to manifest json as described above. Can
          be comma-separated paths.
      labels (Optional[list]): String containing all the possible labels to map to
          if None then automatically picks from ASRSpeechLabel collection.
      min_duration (float): Dataset parameter.
          All training files which have a duration less than min_duration
          are dropped. Note: Duration is read from the manifest JSON.
          Defaults to 0.1.
      max_duration (float): Dataset parameter.
          All training files which have a duration more than max_duration
          are dropped. Note: Duration is read from the manifest JSON.
          Defaults to None.
      trim (bool): Whether to use trim silence from beginning and end
          of audio signal using librosa.effects.trim().
          Defaults to False.
      window_length_in_sec (float): length of window/slice (in seconds)
          Use this for speaker recognition and VAD tasks.
      shift_length_in_sec (float): amount of shift of window for generating the frame for VAD task in a batch
          Use this for VAD task during inference.
      normalize_audio (bool): Whether to normalize audio signal.
          Defaults to False.
      is_regression_task (bool): Whether the dataset is for a regression task instead of classification.
          Defaults to False.
      cal_labels_occurrence (bool): Whether to calculate occurrence of labels
          Defaults to False.
      delimiter (Optional[str]): Delimiter to use when splitting the label string, default to None.
      normalize_audio_db (Optional[float]):  normalize audio signal to a target db, default to None.
class_docstr_tok: ["Dataset","that","loads","a","json","file","containing","paths","to","audio","files",",","durations","(","in","seconds",")",",","and","a","sequence","of","labels",".","Each","new","line","is","a","different","sample",".","Example","below",":","{","``","audio_filepath","''",":","``","\/path\/to\/audio_wav_0.wav","''",",","``","duration","''",":","time_in_sec_0",",","``","label","''",":","``","0","1","1","0","1","''",",","``","offset","''",":","offset_in_sec_0","}","...","{","``","audio_filepath","''",":","``","\/path\/to\/audio_wav_n.wav","''",",","``","duration","''",":","time_in_sec_n",",","``","label","''",":","``","0","1","0","0","1","''",",","``","offset","''",":","offset_in_sec_n","}","Args",":","manifest_filepath","(","Union","[","str",",","List","[","str","]","]",")",":","Path","to","manifest","json","as","described","above",".","Can","be","comma-separated","paths",".","labels","(","Optional","[","list","]",")",":","String","containing","all","the","possible","labels","to","map","to","if","None","then","automatically","picks","from","ASRSpeechLabel","collection",".","min_duration","(","float",")",":","Dataset","parameter",".","All","training","files","which","have","a","duration","less","than","min_duration","are","dropped",".","Note",":","Duration","is","read","from","the","manifest","JSON",".","Defaults","to","0.1.","max_duration","(","float",")",":","Dataset","parameter",".","All","training","files","which","have","a","duration","more","than","max_duration","are","dropped",".","Note",":","Duration","is","read","from","the","manifest","JSON",".","Defaults","to","None",".","trim","(","bool",")",":","Whether","to","use","trim","silence","from","beginning","and","end","of","audio","signal","using","librosa.effects.trim","(",")",".","Defaults","to","False",".","window_length_in_sec","(","float",")",":","length","of","window\/slice","(","in","seconds",")","Use","this","for","speaker","recognition","and","VAD","tasks",".","shift_length_in_sec","(","float",")",":","amount","of","shift","of","window","for","generating","the","frame","for","VAD","task","in","a","batch","Use","this","for","VAD","task","during","inference",".","normalize_audio","(","bool",")",":","Whether","to","normalize","audio","signal",".","Defaults","to","False",".","is_regression_task","(","bool",")",":","Whether","the","dataset","is","for","a","regression","task","instead","of","classification",".","Defaults","to","False",".","cal_labels_occurrence","(","bool",")",":","Whether","to","calculate","occurrence","of","labels","Defaults","to","False",".","delimiter","(","Optional","[","str","]",")",":","Delimiter","to","use","when","splitting","the","label","string",",","default","to","None",".","normalize_audio_db","(","Optional","[","float","]",")",":","normalize","audio","signal","to","a","target","db",",","default","to","None","."]
docstr: Returns definitions of module output ports.
          
docstr_tok: ["Returns","definitions","of","module","output","ports","."]
code: def output_types(self) -> Optional[Dict[str, NeuralType]]:
      """Returns definitions of module output ports."""
  
      output_types = {
          "audio_signal": NeuralType(
              ("B", "T"),
              AudioSignal(freq=self._sample_rate)
              if self is not None and hasattr(self, "_sample_rate")
              else AudioSignal(),
          ),
          "a_sig_length": NeuralType(tuple("B"), LengthsType()),
      }
  
      if self.is_regression_task:
          output_types.update(
              {
                  "targets": NeuralType(
                      tuple("B, T"), RegressionValuesType()
                  ),
                  "targets_length": NeuralType(
                      tuple("B"), LengthsType()
                  ),
              }
          )
      else:
          output_types.update(
              {
                  "label": NeuralType(("B", "T"), LabelsType()),
                  "label_length": NeuralType(tuple("B"), LengthsType()),
              }
          )
  
      return output_types
  
imports: import io
  import os
  from typing import Dict, List, Optional, Union
  import torch
  import webdataset
  from nemo.collections.asr.data.audio_to_text import cache_datastore_manifests, expand_sharded_filepaths
  from nemo.collections.asr.parts.preprocessing.features import WaveformFeaturizer
  from nemo.collections.asr.parts.preprocessing.segment import available_formats
  from nemo.collections.common.parts.preprocessing import collections
  from nemo.core.classes import Dataset, IterableDataset
  from nemo.core.neural_types import AudioSignal, LabelsType, LengthsType, NeuralType, RegressionValuesType
  from nemo.utils import logging
label_desc: Use image node_id 1 for calling the AudioToMultiLabelDataset obj's underlying member method code with example usage: obj.output_types() and returns: output_types