class_docstr: A dataset for audio-to-audio tasks where the goal is to use
  an input signal to recover the corresponding target signal and an
  additional embedding signal. It is assumed that the embedding
  is in a form of a vector.
  
  Each line of the manifest file is expected to have the following format
      ```
      {
          input_key: 'path/to/input.wav',
          target_key: 'path/to/path_to_target.wav',
          embedding_key: 'path/to/path_to_reference.npy',
          'duration': duration_of_input,
      }
      ```
  
  Keys for input, target and embedding signals can be configured in the constructor.
  
  Args:
      manifest_filepath: Path to manifest file in a format described above.
      sample_rate: Sample rate for loaded audio signals.
      input_key: Key pointing to input audio files in the manifest
      target_key: Key pointing to target audio files in manifest
      embedding_key: Key pointing to embedding files in manifest
      audio_duration: Optional duration of each item returned by __getitem__.
                      If `None`, complete audio will be loaded.
                      If set, a random subsegment will be loaded synchronously from
                      target and audio, i.e., with the same start and end point.
      random_offset: If `True`, offset will be randomized when loading a subsegment
                     from a file.
      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.
      input_channel_selector: Optional, select subset of channels from each input audio file.
                              If `None`, all channels will be loaded.
      target_channel_selector: Optional, select subset of channels from each input audio file.
                               If `None`, all channels will be loaded.
class_docstr_tok: ["A","dataset","for","audio-to-audio","tasks","where","the","goal","is","to","use","an","input","signal","to","recover","the","corresponding","target","signal","and","an","additional","embedding","signal",".","It","is","assumed","that","the","embedding","is","in","a","form","of","a","vector",".","Each","line","of","the","manifest","file","is","expected","to","have","the","following","format","``","`","{","input_key",":","'path\/to\/input.wav","'",",","target_key",":","'path\/to\/path_to_target.wav","'",",","embedding_key",":","'path\/to\/path_to_reference.npy","'",",","'duration","'",":","duration_of_input",",","}","``","`","Keys","for","input",",","target","and","embedding","signals","can","be","configured","in","the","constructor",".","Args",":","manifest_filepath",":","Path","to","manifest","file","in","a","format","described","above",".","sample_rate",":","Sample","rate","for","loaded","audio","signals",".","input_key",":","Key","pointing","to","input","audio","files","in","the","manifest","target_key",":","Key","pointing","to","target","audio","files","in","manifest","embedding_key",":","Key","pointing","to","embedding","files","in","manifest","audio_duration",":","Optional","duration","of","each","item","returned","by","__getitem__",".","If","`","None","`",",","complete","audio","will","be","loaded",".","If","set",",","a","random","subsegment","will","be","loaded","synchronously","from","target","and","audio",",","i.e.",",","with","the","same","start","and","end","point",".","random_offset",":","If","`","True","`",",","offset","will","be","randomized","when","loading","a","subsegment","from","a","file",".","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",".","input_channel_selector",":","Optional",",","select","subset","of","channels","from","each","input","audio","file",".","If","`","None","`",",","all","channels","will","be","loaded",".","target_channel_selector",":","Optional",",","select","subset","of","channels","from","each","input","audio","file",".","If","`","None","`",",","all","channels","will","be","loaded","."]
docstr: Returns definitions of module output ports.
  
  Returns:
      Ordered dictionary in the following form:
      ```
      {
          'input_signal': batched single- or multi-channel format,
          'input_length': batched original length of each input signal
          'target_signal': batched single- or multi-channel format,
          'target_length': batched original length of each target signal
          'embedding_vector': batched embedded vector format,
          'embedding_length': batched original length of each embedding vector
      }
      ```
code: def output_types(self) -> Optional[Dict[str, NeuralType]]:
      """Returns definitions of module output ports.
  
      Returns:
          Ordered dictionary in the following form:
          ```
          {
              'input_signal': batched single- or multi-channel format,
              'input_length': batched original length of each input signal
              'target_signal': batched single- or multi-channel format,
              'target_length': batched original length of each target signal
              'embedding_vector': batched embedded vector format,
              'embedding_length': batched original length of each embedding vector
          }
          ```
      """
      sc_audio_type = NeuralType(("B", "T"), AudioSignal())
      mc_audio_type = NeuralType(("B", "C", "T"), AudioSignal())
  
      return OrderedDict(
          input_signal=sc_audio_type
          if self.num_channels("input_signal") == 1
          else mc_audio_type,
          input_length=NeuralType(("B",), LengthsType()),
          target_signal=sc_audio_type
          if self.num_channels("target_signal") == 1
          else mc_audio_type,
          target_length=NeuralType(("B",), LengthsType()),
          embedding_vector=NeuralType(
              ("B", "D"), EncodedRepresentation()
          ),
          embedding_length=NeuralType(("B",), LengthsType()),
      )
  
imports: import abc
  import math
  import random
  from collections import OrderedDict, namedtuple
  from dataclasses import dataclass
  from typing import Callable, Dict, List, Optional, Tuple, Type, Union
  import librosa
  import numpy
  import torch
  from nemo.collections.asr.parts.preprocessing.segment import AudioSegment
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.collections.common.parts.preprocessing import collections
  from nemo.collections.common.parts.utils import flatten
  from nemo.core.classes import Dataset
  from nemo.core.neural_types import AudioSignal, EncodedRepresentation, LengthsType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 2 for calling the AudioToTargetWithEmbeddingDataset obj's underlying member method code with example usage: obj.output_types() and returns: OrderedDict