(wavfile, params)
return waveforms.audio, waveforms.sample_rate
params:
       wavfile: file name
     returns:
       audio: samples of shape [nsample, channels]
       sample_rate: sample rate
params:
       wavfile: file name
     returns:
       audio: samples of shape [nsample, channels]
       sample_rate: sample rate
params : wavfile : file name returns : audio : samples of shape [ nsample channels ] sample_rate : sample rate
def read_wav(wavfile, params):
  '''
     params:
       wavfile: file name
     returns:
       audio: samples of shape [nsample, channels]
       sample_rate: sample rate
  '''
  contents = tf.read_file(wavfile)
  #pylint: disable=no-member
  waveforms = tf.audio.decode_wav(
      contents,
      desired_channels=params.audio_desired_channels,
      desired_samples=params.audio_desired_samples,
  )
  return waveforms.audio, waveforms.sample_rate
def read_wav ( wavfile , params ) : contents = tf . read_file ( wavfile ) #pylint: disable=no-member waveforms = tf . audio . decode_wav ( contents , desired_channels = params . audio_desired_channels , desired_samples = params . audio_desired_samples , ) return waveforms . audio , waveforms . sample_rate