(files, sample_length=64000)
return batch
Load a batch of audio from either .wav files.

  Args:
    files: A list of filepaths to .wav files.
    sample_length: Maximum sample length

  Returns:
    batch: A padded array of audio [n_files, sample_length]
Load a batch of audio from either .wav files.
Load a batch of audio from either . wav files .
def load_batch_audio(files, sample_length=64000):
  """Load a batch of audio from either .wav files.

  Args:
    files: A list of filepaths to .wav files.
    sample_length: Maximum sample length

  Returns:
    batch: A padded array of audio [n_files, sample_length]
  """
  batch = []
  # Load the data
  for f in files:
    data = utils.load_audio(f, sample_length, sr=16000)
    length = data.shape[0]
    # Add padding if less than sample length
    if length < sample_length:
      padded = np.zeros([sample_length])
      padded[:length] = data
      batch.append(padded)
    else:
      batch.append(data)
  # Return as an numpy array
  batch = np.array(batch)
  return batch
def load_batch_audio ( files , sample_length = 64000 ) : batch = [ ] # Load the data for f in files : data = utils . load_audio ( f , sample_length , sr = 16000 ) length = data . shape [ 0 ] # Add padding if less than sample length if length < sample_length : padded = np . zeros ( [ sample_length ] ) padded [ : length ] = data batch . append ( padded ) else : batch . append ( data ) # Return as an numpy array batch = np . array ( batch ) return batch