code: def Read_input(data, batch_size):
      """
      Returns:
          audios_np: a numpy array of size (batch_size, max_length) in float
          sample_rate: a numpy array
          trans: an array includes the targeted transcriptions (batch_size,)
      """
      audios = []
      lengths = []
  
      for i in range(batch_size):
          name, _ = data[0, i].split(".")
  
          if FLAGS.adv:
              sample_rate_np, delta = wav.read(
                  "./"
                  + str(name)
                  + "_robust_perturb_"
                  + FLAGS.stage
                  + ".wav"
              )
              _, audio_orig = wav.read("./" + str(name) + ".wav")
              if max(delta) < 1:
                  delta = delta * 32768
              audio_np = audio_orig + delta
          else:
              sample_rate_np, audio_np = wav.read(
                  "./" + str(name) + ".wav"
              )
  
          length = len(audio_np)
  
          audios.append(audio_np)
          lengths.append(length)
  
      max_length = max(lengths)
      masks = np.zeros([batch_size, max_length])
      lengths_freq = (np.array(lengths) // 2 + 1) // 240 * 3
      max_length_freq = max(lengths_freq)
      masks_freq = np.zeros([batch_size, max_length_freq, 80])
  
      # combine the audios into one array
      audios_np = np.zeros([batch_size, max_length])
  
      for i in range(batch_size):
          audios_np[i, : lengths[i]] = audios[i]
          masks[i, : lengths[i]] = 1
          masks_freq[i, : lengths_freq[i], :] = 1
  
      audios_np = audios_np.astype(float)
  
      if FLAGS.adv:
          trans = data[2, :]
      else:
          trans = data[1, :]
  
      lengths = np.array(lengths).astype(np.int32)
  
      return (
          audios_np,
          sample_rate_np,
          trans,
          masks_freq,
          lengths,
          max_length,
          masks,
      )
  
file_path: cleverhans/cleverhans_v3.1.0/examples/adversarial_asr/test_robust_adv.py
imports: import tensorflow
  from lingvo import model_imports
  from lingvo import model_registry
  import numpy
  import scipy.io.wavfile
  import generate_masking_threshold
  from tool import create_features, create_inputs, create_speech_rir
  import time
  from lingvo.core import cluster_factory
  from absl import flags
  from absl import app
label_desc: Use image node_id 1 for calling a global function with example usage: Read_input(data, batch_size) and returns: audios_np,  sample_rate_np,  trans,  masks_freq,  lengths,  max_length,  masks