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 an audio file.
  For a single-channel signal, the output is shape (num_samples,).
  For a multi-channel signal, the output is shape (num_samples, num_channels).
  
  Args:
      audio_file: path to an audio file
      sample_rate: desired sample rate for output samples
      duration: Optional desired duration of output samples.
              If `None`, the complete file will be loaded.
              If set, a segment of `duration` seconds will be loaded.
      channel_selector: Optional channel selector, for selecting a subset of channels.
      fixed_offset: Optional fixed offset when loading samples.
      random_offset: If `True`, offset will be randomized when loading a short segment
                  from a file. The value is randomized between fixed_offset and
                  max_offset (set depending on the duration and fixed_offset).
  
  Returns:
      Numpy array with samples from audio file.
      The array has shape (num_samples,) for a single-channel signal
      or (num_channels, num_samples) for a multi-channel signal.
code: def get_samples(
      cls,
      audio_file: str,
      sample_rate: int,
      duration: Optional[float] = None,
      channel_selector: ChannelSelectorType = None,
      fixed_offset: float = 0,
      random_offset: bool = False,
  ) -> np.ndarray:
      """Get samples from an audio file.
      For a single-channel signal, the output is shape (num_samples,).
      For a multi-channel signal, the output is shape (num_samples, num_channels).
  
      Args:
          audio_file: path to an audio file
          sample_rate: desired sample rate for output samples
          duration: Optional desired duration of output samples.
                  If `None`, the complete file will be loaded.
                  If set, a segment of `duration` seconds will be loaded.
          channel_selector: Optional channel selector, for selecting a subset of channels.
          fixed_offset: Optional fixed offset when loading samples.
          random_offset: If `True`, offset will be randomized when loading a short segment
                      from a file. The value is randomized between fixed_offset and
                      max_offset (set depending on the duration and fixed_offset).
  
      Returns:
          Numpy array with samples from audio file.
          The array has shape (num_samples,) for a single-channel signal
          or (num_channels, num_samples) for a multi-channel signal.
      """
      output = cls.get_samples_synchronized(
          audio_files=[audio_file],
          sample_rate=sample_rate,
          duration=duration,
          channel_selectors=[channel_selector],
          fixed_offset=fixed_offset,
          random_offset=random_offset,
      )
  
      return output[0]
  
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 17 for calling the ASRAudioProcessor obj's underlying member method code with example usage: obj.get_samples(cls, audio_file, sample_rate, duration, channel_selector, fixed_offset, random_offset) and returns: output