Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -9,6 +9,7 @@ def process_audio(input_file, effect_8d, effect_slowed, effect_reverb,
|
|
9 |
try:
|
10 |
# Load the sound file
|
11 |
sound = Fusion.loadSound(input_file)
|
|
|
12 |
|
13 |
# Apply effects based on user choices
|
14 |
if effect_8d:
|
@@ -16,11 +17,10 @@ def process_audio(input_file, effect_8d, effect_slowed, effect_reverb,
|
|
16 |
if effect_slowed:
|
17 |
sound = Fusion.effectSlowed(sound, speed_multiplier)
|
18 |
if effect_reverb:
|
19 |
-
sound = Fusion.effectReverb(sound, room_size, damping, width, wet_level, dry_level)
|
20 |
|
21 |
# Save the processed sound and return the output file
|
22 |
-
output_file
|
23 |
-
Fusion.saveSound(sound, output_file, effect_reverb)
|
24 |
return output_file
|
25 |
|
26 |
except Fusion.InvalidMusicFileError as e:
|
@@ -50,4 +50,4 @@ iface = gr.Interface(
|
|
50 |
title="Audio Fusion"
|
51 |
)
|
52 |
|
53 |
-
iface.launch(share=
|
|
|
9 |
try:
|
10 |
# Load the sound file
|
11 |
sound = Fusion.loadSound(input_file)
|
12 |
+
output_file = secrets.token_hex(5)
|
13 |
|
14 |
# Apply effects based on user choices
|
15 |
if effect_8d:
|
|
|
17 |
if effect_slowed:
|
18 |
sound = Fusion.effectSlowed(sound, speed_multiplier)
|
19 |
if effect_reverb:
|
20 |
+
sound = Fusion.effectReverb(sound, room_size, damping, width, wet_level, dry_level, "temp"+output_file+".wav")
|
21 |
|
22 |
# Save the processed sound and return the output file
|
23 |
+
Fusion.saveSound(sound, output_file, effect_reverb, "temp"+output_file+".wav")
|
|
|
24 |
return output_file
|
25 |
|
26 |
except Fusion.InvalidMusicFileError as e:
|
|
|
50 |
title="Audio Fusion"
|
51 |
)
|
52 |
|
53 |
+
iface.launch(share=False)
|