How Does Tf.audio.decode_wav Get Its Contents?
I'm trying to pull some audio files into Tensorflow by using tf.audio.decode_wav. I can see someone is looking into providing more info in the docs, but does anyone have any exampl
Solution 1:
You're right, tf.audio.decode_wav()
requires a tensor. You can provide one with
tf.io.read_file()
which reads wav file into tensor of type string.
raw_audio = tf.io.read_file(filename)
waveform = tf.audio.decode_wav(raw_audio)
Post a Comment for "How Does Tf.audio.decode_wav Get Its Contents?"