I have the following code taken from this tutorial.
def get_spectrogram(waveform): zero_padding = tf.zeros([4900] - tf.shape(waveform), dtype=tf.float32) wave