Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def extend_music(file, added_minutes):
|
|
42 |
# Normalize audio to the range of [-1, 1]
|
43 |
extended_audio = extended_audio / np.max(np.abs(extended_audio)) if np.max(np.abs(extended_audio)) > 0 else extended_audio
|
44 |
|
45 |
-
# Return the audio as a NumPy array and the sample rate as an integer
|
46 |
return extended_audio.astype(np.float32), sr # Ensure it's a float32 NumPy array
|
47 |
|
48 |
# Gradio UI setup
|
|
|
42 |
# Normalize audio to the range of [-1, 1]
|
43 |
extended_audio = extended_audio / np.max(np.abs(extended_audio)) if np.max(np.abs(extended_audio)) > 0 else extended_audio
|
44 |
|
45 |
+
# Return the audio as a NumPy array (float32) and the sample rate as an integer
|
46 |
return extended_audio.astype(np.float32), sr # Ensure it's a float32 NumPy array
|
47 |
|
48 |
# Gradio UI setup
|