replace("_"," ") name_song.append(temp_name) else: name_song.append() name_artist.append() if not : name_album.append(np.nan) else: name_album.append() time.sleep(0.05) #print the total number of the tracks obtained print(f"") ids.append(np.nan) #libraries import eyed3 import os import re import csv import numpy as np import time #Let the user introduce the path of the music folder path = str(input("Please Introduce the Path Folder: ")) #Save the name of each mp3 file on a list called "filenames" filenames = for r,d,f in os.walk(path): for file in f: if file.endswith(".mp3"): filenames.append(file) #Obtain the features of each mp3 file and saved them on 3 lists name_song = name_artist = name_album = for filename in filenames: pathfile = path "\\" filename audioinfo = eyed3.load(pathfile) if not : temp_name = re.findall("^(. ?).mp3",filename). The folder looks something like this:įinally Obtaining the features and information of all the track files I saved this data into a CSV file using the CSV library. This folder contains 47 songs of different Post-Rock bands. To start my project I decided to use a folder of my dad’s music to make my script.
0 Comments
Leave a Reply. |