diff --git a/src/audio/ingest.py b/src/audio/ingest.py index e99f126..76fd6bf 100644 --- a/src/audio/ingest.py +++ b/src/audio/ingest.py @@ -42,6 +42,7 @@ def __read_audio_to_dict(path, file_format): genres = __get_genres_from_path(p, path) d = tracks_dict ts, sr = get_time_series_and_sample_rate_of_audio(p) + featx.get_mfccs(ts, sr, name=p.name) for g in genres: if not d[g]: d[g] = [ts] diff --git a/src/audio/processing/feature_extraction.py b/src/audio/processing/feature_extraction.py index b6d7507..8d54071 100644 --- a/src/audio/processing/feature_extraction.py +++ b/src/audio/processing/feature_extraction.py @@ -6,6 +6,9 @@ def get_spectral_centroids(ts, sr): return spectral_centroids[0] -def get_mfccs(ts, sr): +def get_mfccs(ts, sr, name=None): mfccs = librosa.feature.mfcc(ts, sr=sr) - print(mfccs.shape) + if name is not None: + print(name + str(mfccs.shape)) + else: + print(mfccs.shape)