Spaces:
Runtime error
Runtime error
amirgame197
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
import gradio as gr
|
2 |
import os
|
|
|
3 |
import random
|
4 |
import subprocess
|
5 |
|
@@ -23,6 +24,7 @@ def separate_audio(audio_path):
|
|
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 |
|
|
|
1 |
import gradio as gr
|
2 |
import os
|
3 |
+
import time
|
4 |
import random
|
5 |
import subprocess
|
6 |
|
|
|
24 |
|
25 |
os.replace(f"{gradio_temp_path}/{audio_filename}/accompaniment.wav", f"{gradio_temp_path}/{audio_filename}/accompaniment.wav.bak")
|
26 |
os.replace(f"{gradio_temp_path}/{audio_filename}/vocals.wav", f"{gradio_temp_path}/{audio_filename}/vocals.wav.bak")
|
27 |
+
time.sleep(1)
|
28 |
subprocess.run(f"ffmpeg -i {gradio_temp_path}/{audio_filename}/accompaniment.wav.bak {gradio_temp_path}/{audio_filename}/accompaniment.mp3")
|
29 |
subprocess.run(f"ffmpeg -i {gradio_temp_path}/{audio_filename}/vocals.wav.bak {gradio_temp_path}/{audio_filename}/vocals.mp3")
|
30 |
|