teticio commited on
Commit
b981ece
1 Parent(s): e0ef439

height and width wrong way round in reshape

Browse files
audiodiffusion/__init__.py CHANGED
@@ -11,7 +11,7 @@ from diffusers import (DiffusionPipeline, UNet2DConditionModel, DDIMScheduler,
11
 
12
  from .mel import Mel
13
 
14
- VERSION = "1.2.4"
15
 
16
 
17
  class AudioDiffusion:
 
11
 
12
  from .mel import Mel
13
 
14
+ VERSION = "1.2.5"
15
 
16
 
17
  class AudioDiffusion:
audiodiffusion/mel.py CHANGED
@@ -119,7 +119,7 @@ class Mel:
119
  audio (np.ndarray): raw audio
120
  """
121
  bytedata = np.frombuffer(image.tobytes(), dtype="uint8").reshape(
122
- (image.width, image.height))
123
  log_S = bytedata.astype("float") * self.top_db / 255 - self.top_db
124
  S = librosa.db_to_power(log_S)
125
  audio = librosa.feature.inverse.mel_to_audio(
 
119
  audio (np.ndarray): raw audio
120
  """
121
  bytedata = np.frombuffer(image.tobytes(), dtype="uint8").reshape(
122
+ (image.height, image.width))
123
  log_S = bytedata.astype("float") * self.top_db / 255 - self.top_db
124
  S = librosa.db_to_power(log_S)
125
  audio = librosa.feature.inverse.mel_to_audio(