teticio commited on
Commit
61d4556
1 Parent(s): 0e6916b

load audio and resample to specified sample rate

Browse files
Files changed (1) hide show
  1. 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