Spaces:
Sleeping
Sleeping
pierre-loic
commited on
Commit
·
ab9b63b
1
Parent(s):
45d4467
update model small feature, decision tree full
Browse files- model_audio.pkl +2 -2
- tasks/audio.py +1 -1
model_audio.pkl
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dccc5162edbe098f9e7b9f90b2085b860fe8ed762418f1951fac90a176d2866e
|
3 |
+
size 443961
|
tasks/audio.py
CHANGED
@@ -56,7 +56,7 @@ async def evaluate_audio(request: AudioEvaluationRequest):
|
|
56 |
def extract_features(example, sampling_rate):
|
57 |
audio_array = example['audio']['array']
|
58 |
# mfcc = librosa.feature.mfcc(y=audio_array, sr=sampling_rate, n_mfcc=5)
|
59 |
-
mfcc = librosa.feature.
|
60 |
return np.mean(mfcc, axis=1)
|
61 |
|
62 |
def predict_new_audio(model, dataset, sampling_rate):
|
|
|
56 |
def extract_features(example, sampling_rate):
|
57 |
audio_array = example['audio']['array']
|
58 |
# mfcc = librosa.feature.mfcc(y=audio_array, sr=sampling_rate, n_mfcc=5)
|
59 |
+
mfcc = librosa.feature.spectral_contrast(y=audio_array)
|
60 |
return np.mean(mfcc, axis=1)
|
61 |
|
62 |
def predict_new_audio(model, dataset, sampling_rate):
|