Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -194,8 +194,11 @@ def generate_audio_from_image(image):
|
|
194 |
# Convert the generated spectrogram to audio
|
195 |
generated_audio = spectrogram_to_audio(generated_spectrogram.squeeze(0).cpu())
|
196 |
|
197 |
-
#
|
198 |
-
|
|
|
|
|
|
|
199 |
|
200 |
|
201 |
# Gradio Interface
|
|
|
194 |
# Convert the generated spectrogram to audio
|
195 |
generated_audio = spectrogram_to_audio(generated_spectrogram.squeeze(0).cpu())
|
196 |
|
197 |
+
# Convert the audio tensor to a NumPy array before passing it to Gradio
|
198 |
+
generated_audio_numpy = generated_audio.numpy()
|
199 |
+
|
200 |
+
# Return the sample rate and the NumPy array containing the audio
|
201 |
+
return (sample_rate, generated_audio_numpy)
|
202 |
|
203 |
|
204 |
# Gradio Interface
|