(wavfile, params)
return tf.squeeze(waveforms.audio, axis=-1)
samples of shape [nsample]
samples of shape [nsample]
samples of shape [ nsample ]
def read_wav(wavfile, params):
  ''' samples of shape [nsample] '''
  contents = tf.read_file(wavfile)
  #pylint: disable=no-member
  waveforms = tf.audio.decode_wav(
      contents,
      desired_channels=params.audio_channels,
      #desired_samples=params.audio_sample_rate,
  )
  return tf.squeeze(waveforms.audio, axis=-1)
def read_wav ( wavfile , params ) : contents = tf . read_file ( wavfile ) #pylint: disable=no-member waveforms = tf . audio . decode_wav ( contents , desired_channels = params . audio_channels , #desired_samples=params.audio_sample_rate, ) return tf . squeeze ( waveforms . audio , axis = - 1 )