Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,9 +21,14 @@ def separate_audio(audio_path):
|
|
21 |
result = subprocess.run(command)
|
22 |
print(result)
|
23 |
|
|
|
|
|
|
|
|
|
|
|
24 |
paths = []
|
25 |
-
paths.append(gradio_temp_path + f"/{audio_filename}/accompaniment.
|
26 |
-
paths.append(gradio_temp_path + f"/{audio_filename}/vocals.
|
27 |
return [gr.Audio(path) for path in paths]
|
28 |
|
29 |
iface = gr.Interface(
|
|
|
21 |
result = subprocess.run(command)
|
22 |
print(result)
|
23 |
|
24 |
+
os.replace(f"{gradio_temp_path}/{audio_filename}/accompaniment.wav", f"{gradio_temp_path}/{audio_filename}/accompaniment.wav.bak")
|
25 |
+
os.replace(f"{gradio_temp_path}/{audio_filename}/vocals.wav", f"{gradio_temp_path}/{audio_filename}/vocals.wav.bak")
|
26 |
+
subprocess.run(f"ffmpeg -i {gradio_temp_path}/{audio_filename}/accompaniment.wav.bak {gradio_temp_path}/{audio_filename}/accompaniment.mp3")
|
27 |
+
subprocess.run(f"ffmpeg -i {gradio_temp_path}/{audio_filename}/vocals.wav.bak {gradio_temp_path}/{audio_filename}/vocals.mp3")
|
28 |
+
|
29 |
paths = []
|
30 |
+
paths.append(gradio_temp_path + f"/{audio_filename}/accompaniment.mp3")
|
31 |
+
paths.append(gradio_temp_path + f"/{audio_filename}/vocals.mp3")
|
32 |
return [gr.Audio(path) for path in paths]
|
33 |
|
34 |
iface = gr.Interface(
|