Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,10 +21,10 @@ def loading_sound_file(sound_file, sr=22050, duration=10):
|
|
21 |
X, sr = lib.load(sound_file, sr=sr, duration=duration)
|
22 |
dur = lib.get_duration(y=X, sr=sr)
|
23 |
|
24 |
-
# pad audio file same duration
|
25 |
-
if (round(dur) < duration):
|
26 |
-
|
27 |
-
|
28 |
# extract normalized mfcc feature from data
|
29 |
mfccs = np.mean(lib.feature.mfcc(y=X, sr=sr, n_mfcc=25).T,axis=0)
|
30 |
|
|
|
21 |
X, sr = lib.load(sound_file, sr=sr, duration=duration)
|
22 |
dur = lib.get_duration(y=X, sr=sr)
|
23 |
|
24 |
+
# # pad audio file same duration
|
25 |
+
# if (round(dur) < duration):
|
26 |
+
# print ("fixing audio lenght :", file_name)
|
27 |
+
# y = lib.util.fix_length(X, input_length)
|
28 |
# extract normalized mfcc feature from data
|
29 |
mfccs = np.mean(lib.feature.mfcc(y=X, sr=sr, n_mfcc=25).T,axis=0)
|
30 |
|