From e213d8b0147552ef5c238e3958df22a68bbfa830 Mon Sep 17 00:00:00 2001 From: Mikkeli Matlock Date: Wed, 25 Sep 2024 10:35:07 +0900 Subject: [PATCH] structural fix --- master_core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/master_core.py b/master_core.py index 7c2cf3e..3d3a2f5 100644 --- a/master_core.py +++ b/master_core.py @@ -24,6 +24,13 @@ def read_mp3_tags(file_path): print(f"{audio['artist'][0]} - {audio['title'][0]}") else: print(f"File name: {os.path.basename(file_path)}") + +class AudioFile: + def __init__(self, file_path): + self.file_path = file_path + self.y, self.sr = librosa.load(file_path) + self.y_mono = librosa.to_mono(self.y) + def analyze_track_librosa(file_path): # Load the audio file