Spaces:
Runtime error
Runtime error
updated get_wave_label()
Browse files
app.py
CHANGED
@@ -15,7 +15,8 @@ from tensorflow.keras.layers import Dense, Dropout, Flatten, Conv2D, MaxPool2D,
|
|
15 |
def get_waveform_label(file):
|
16 |
#lab = tf.strings.split(file, os.path.sep)[-2]
|
17 |
print(file)
|
18 |
-
|
|
|
19 |
audio, _ = tf.audio.decode_wav(audio_binary)
|
20 |
waveform=tf.squeeze(audio, axis=-1)
|
21 |
return waveform
|
|
|
15 |
def get_waveform_label(file):
|
16 |
#lab = tf.strings.split(file, os.path.sep)[-2]
|
17 |
print(file)
|
18 |
+
print(file.name)
|
19 |
+
audio_binary = tf.io.read_file(file.name)
|
20 |
audio, _ = tf.audio.decode_wav(audio_binary)
|
21 |
waveform=tf.squeeze(audio, axis=-1)
|
22 |
return waveform
|