Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,11 +21,11 @@ def separate_audio(audio_path):
|
|
| 21 |
|
| 22 |
result = subprocess.run(command)
|
| 23 |
print(result)
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 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")
|
|
|
|
| 21 |
|
| 22 |
result = subprocess.run(command)
|
| 23 |
print(result)
|
| 24 |
+
subprocess.run((f"ffmpeg -y -i {gradio_temp_path}/{audio_filename}/accompaniment.wav {gradio_temp_path}/{audio_filename}/accompaniment.mp3").split())
|
| 25 |
+
subprocess.run((f"ffmpeg -y -i {gradio_temp_path}/{audio_filename}/vocals.wav {gradio_temp_path}/{audio_filename}/vocals.mp3").split())
|
| 26 |
+
os.remove(gradio_temp_path + f"/{audio_filename}/accompaniment.wav")
|
| 27 |
+
os.remove(gradio_temp_path + f"/{audio_filename}/accompaniment.wav")
|
| 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")
|