Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def get_spectro(prompt):
|
|
23 |
image = pipe(prompt).images[0]
|
24 |
return image
|
25 |
|
26 |
-
def wav_bytes_from_spectrogram_image(image):
|
27 |
"""
|
28 |
Reconstruct a WAV audio clip from a spectrogram image. Also returns the duration in seconds.
|
29 |
"""
|
@@ -71,7 +71,7 @@ def wav_bytes_from_spectrogram_image(image):
|
|
71 |
return wav_bytes
|
72 |
|
73 |
def spectrogram_from_image(
|
74 |
-
image, max_volume: float = 50, power_for_image: float = 0.25
|
75 |
) -> np.ndarray:
|
76 |
"""
|
77 |
Compute a spectrogram magnitude array from a spectrogram image.
|
|
|
23 |
image = pipe(prompt).images[0]
|
24 |
return image
|
25 |
|
26 |
+
def wav_bytes_from_spectrogram_image(image: Image.Image) -> T.Tuple[io.BytesIO, float]:
|
27 |
"""
|
28 |
Reconstruct a WAV audio clip from a spectrogram image. Also returns the duration in seconds.
|
29 |
"""
|
|
|
71 |
return wav_bytes
|
72 |
|
73 |
def spectrogram_from_image(
|
74 |
+
image: Image.Image, max_volume: float = 50, power_for_image: float = 0.25
|
75 |
) -> np.ndarray:
|
76 |
"""
|
77 |
Compute a spectrogram magnitude array from a spectrogram image.
|