Fix DeprecationWarning in BPM rounding; ensure BPM tags are correctly written and updated
This commit is contained in:
@@ -38,7 +38,7 @@ def analyze_bpm_librosa(file_path):
|
||||
try:
|
||||
y, sr = librosa.load(file_path, mono=True)
|
||||
tempo, _ = librosa.beat.beat_track(y=y, sr=sr)
|
||||
return int(round(float(tempo)))
|
||||
return int(round(float(tempo[0])))
|
||||
except Exception as e:
|
||||
print(f"Error analyzing BPM for {file_path.name}: {e}")
|
||||
return None
|
||||
|
Reference in New Issue
Block a user