Skip to content

Commit

Permalink
clean: quiet librosa load warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jason committed Dec 2, 2022
1 parent 914671d commit f0fb5e9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion osu_dreamer/model/data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
import random
import warnings

from pathlib import Path
from functools import partial
Expand Down Expand Up @@ -46,7 +47,9 @@ def reclaim_memory():
pass

def load_audio(audio_file):
wave, sr = librosa.load(audio_file)
with warnings.catch_warnings():
warnings.simplefilter("ignore")
wave, sr = librosa.load(audio_file)

# compute spectrogram
spec: "A,L" = torchaudio.transforms.MFCC(
Expand Down

0 comments on commit f0fb5e9

Please sign in to comment.