class_docstr: Resample audio to a specified framerate.
docstr: Reample audio to the specified audio fps.
  
  Args:
      data: A dict of data input in the following format:
      {
          "samples": {
              "audio": torch.FloatTensor[num_clips x temporal_size x num_channels]
              "metadata": {
                  "audio_fps": float
              }
          }
      },
  
  Returns: {
      "samples": {
          "audio": torch.FloatTensor[num_clips x temporal_size x num_channels]
          "metadata": {
              "audio_fps": float
          }
      }
  }
docstr_tok: ["Reample","audio","to","the","specified","audio","fps",".","Args",":","data",":","A","dict","of","data","input","in","the","following","format",":","{","``","samples","''",":","{","``","audio","''",":","torch.FloatTensor","[","num_clips","x","temporal_size","x","num_channels","]","``","metadata","''",":","{","``","audio_fps","''",":","float","}","}","}",",","Returns",":","{","``","samples","''",":","{","``","audio","''",":","torch.FloatTensor","[","num_clips","x","temporal_size","x","num_channels","]","``","metadata","''",":","{","``","audio_fps","''",":","float","}","}","}"]
code: def __call__(self, data: Dict, *args, **kwargs) -> Dict:
      """Reample audio to the specified audio fps.
  
      Args:
          data: A dict of data input in the following format:
          {
              "samples": {
                  "audio": torch.FloatTensor[num_clips x temporal_size x num_channels]
                  "metadata": {
                      "audio_fps": float
                  }
              }
          },
  
      Returns: {
          "samples": {
              "audio": torch.FloatTensor[num_clips x temporal_size x num_channels]
              "metadata": {
                  "audio_fps": float
              }
          }
      }
      """
      audio = data["samples"]["audio"]
  
      audio_rate = data["samples"]["metadata"]["audio_fps"]
      resampled_audio = []
      for audio_tensor in audio:
          (
              resampled_audio_tensor,
              sample_rate,
          ) = torchaudio.sox_effects.apply_effects_tensor(
              audio_tensor,
              audio_rate,
              self.effects,
              channels_first=False,
          )
          resampled_audio.append(resampled_audio_tensor)
      data["samples"]["audio"] = torch.stack(resampled_audio, dim=0)
      data["samples"]["metadata"]["audio_fps"] = self.sample_rate
      return data
  
imports: import argparse
  import math
  import pathlib
  import random
  from typing import Callable, Dict, List, Optional, Union
  import torch
  import torchaudio
  from data.transforms import TRANSFORMATIONS_REGISTRY, BaseTransformation
  from data.transforms.audio_aux import mfccs
label_desc: Use image node_id 3 for calling the AudioResample obj's underlying member method code with example usage: obj.__call__(data) and returns: data