Spaces:
Runtime error
Runtime error
load audio and resample to specified sample rate
Browse files- audiodiffusion/mel.py +1 -1
audiodiffusion/mel.py
CHANGED
@@ -47,7 +47,7 @@ class Mel:
|
|
47 |
raw_audio (np.ndarray): audio as numpy array
|
48 |
"""
|
49 |
if audio_file is not None:
|
50 |
-
self.audio, _ = librosa.load(audio_file, mono=True)
|
51 |
else:
|
52 |
self.audio = raw_audio
|
53 |
|
|
|
47 |
raw_audio (np.ndarray): audio as numpy array
|
48 |
"""
|
49 |
if audio_file is not None:
|
50 |
+
self.audio, _ = librosa.load(audio_file, mono=True, sr=self.sr)
|
51 |
else:
|
52 |
self.audio = raw_audio
|
53 |
|