class_docstr: Class that processes an example from Audio collection and returns
  a dictionary with prepared signals.
  
  For example, the output dictionary may be the following
  ```
  {
      'input_signal': input_signal_tensor,
      'target_signal': target_signal_tensor,
      'reference_signal': reference_signal_tensor,
      'embedding_vector': embedding_vector
  }
  ```
  Keys in the output dictionary are ordered with synchronous signals given first,
  followed by asynchronous signals and embedding.
  
  Args:
      sample_rate: sample rate used for all audio signals
      random_offset: If `True`, offset will be randomized when loading a subsegment
                     from a file.
class_docstr_tok: ["Class","that","processes","an","example","from","Audio","collection","and","returns","a","dictionary","with","prepared","signals",".","For","example",",","the","output","dictionary","may","be","the","following","``","`","{","'input_signal","'",":","input_signal_tensor",",","'target_signal","'",":","target_signal_tensor",",","'reference_signal","'",":","reference_signal_tensor",",","'embedding_vector","'",":","embedding_vector","}","``","`","Keys","in","the","output","dictionary","are","ordered","with","synchronous","signals","given","first",",","followed","by","asynchronous","signals","and","embedding",".","Args",":","sample_rate",":","sample","rate","used","for","all","audio","signals","random_offset",":","If","`","True","`",",","offset","will","be","randomized","when","loading","a","subsegment","from","a","file","."]
docstr: Get samples from a single or multiple files.
  If loading samples from multiple files, they will
  be concatenated along the channel dimension.
  
  Args:
      audio_file: path or a list of paths.
      sample_rate: sample rate of the loaded samples
      offset: fixed offset in seconds
      num_samples: Optional, number of samples to load.
                   If `None`, all available samples will be loaded.
      channel_selector: Select a subset of available channels.
  
  Returns:
      An array with shape (samples,) or (channels, samples)
code: def get_samples_from_file(
      cls,
      audio_file: Union[str, List[str]],
      sample_rate: int,
      offset: float,
      num_samples: Optional[int] = None,
      channel_selector: Optional[ChannelSelectorType] = None,
  ) -> np.ndarray:
      """Get samples from a single or multiple files.
      If loading samples from multiple files, they will
      be concatenated along the channel dimension.
  
      Args:
          audio_file: path or a list of paths.
          sample_rate: sample rate of the loaded samples
          offset: fixed offset in seconds
          num_samples: Optional, number of samples to load.
                       If `None`, all available samples will be loaded.
          channel_selector: Select a subset of available channels.
  
      Returns:
          An array with shape (samples,) or (channels, samples)
      """
      if isinstance(audio_file, str):
          # Load samples from a single file
          segment_samples = cls.get_segment_from_file(
              audio_file=audio_file,
              sample_rate=sample_rate,
              offset=offset,
              num_samples=num_samples,
              channel_selector=channel_selector,
          )
      elif isinstance(audio_file, list):
          # Load samples from multiple files and form a multi-channel signal
          segment_samples = []
          for a_file in audio_file:
              a_file_samples = cls.get_segment_from_file(
                  audio_file=a_file,
                  sample_rate=sample_rate,
                  offset=offset,
                  num_samples=num_samples,
                  channel_selector=channel_selector,
              )
              segment_samples.append(a_file_samples)
          segment_samples = cls.list_to_multichannel(segment_samples)
      elif audio_file is None:
          # Support for inference, when the target signal is `None`
          segment_samples = []
      else:
          raise RuntimeError(
              f"Unexpected audio_file type {type(audio_file)}"
          )
      return segment_samples
  
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 19 for calling the ASRAudioProcessor obj's underlying member method code with example usage: obj.get_samples_from_file(cls, audio_file, sample_rate, offset, num_samples, channel_selector) and returns: segment_samples