diff --git a/utils.py b/utils.py index 85fd3e2b..9a3f63fd 100644 --- a/utils.py +++ b/utils.py @@ -90,7 +90,7 @@ def extract_feature(file_name, **kwargs): chroma = np.mean(librosa.feature.chroma_stft(S=stft, sr=sample_rate).T,axis=0) result = np.hstack((result, chroma)) if mel: - mel = np.mean(librosa.feature.melspectrogram(X, sr=sample_rate).T,axis=0) + mel = np.mean(librosa.feature.melspectrogram(y=X, sr=sample_rate).T,axis=0) result = np.hstack((result, mel)) if contrast: contrast = np.mean(librosa.feature.spectral_contrast(S=stft, sr=sample_rate).T,axis=0) @@ -125,4 +125,4 @@ def get_audio_config(features_list): raise TypeError(f"Feature passed: {feature} is not recognized.") audio_config[feature] = True return audio_config - \ No newline at end of file +