Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
import tempfile
|
|
|
|
| 4 |
from uuid import uuid4
|
| 5 |
from audio_sep_splitter import batch_process
|
| 6 |
|
|
@@ -10,7 +11,9 @@ def split_audio(audio_filepath):
|
|
| 10 |
aggressiveness_factor = 2
|
| 11 |
splitter = "phoenix"
|
| 12 |
vocal_file = batch_process(audio_filepath, output_file, stem, aggressiveness_factor, splitter)
|
| 13 |
-
|
|
|
|
|
|
|
| 14 |
|
| 15 |
interface = gr.Interface(
|
| 16 |
split_audio,
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
import tempfile
|
| 4 |
+
import subprocess
|
| 5 |
from uuid import uuid4
|
| 6 |
from audio_sep_splitter import batch_process
|
| 7 |
|
|
|
|
| 11 |
aggressiveness_factor = 2
|
| 12 |
splitter = "phoenix"
|
| 13 |
vocal_file = batch_process(audio_filepath, output_file, stem, aggressiveness_factor, splitter)
|
| 14 |
+
mp3_vocal_file = f"{vocal_file}.mp3"
|
| 15 |
+
subprocess.run(f"ffmpeg -i '{vocal_file}' '{mp3_vocal_file}'", shell=True)
|
| 16 |
+
return mp3_vocal_file
|
| 17 |
|
| 18 |
interface = gr.Interface(
|
| 19 |
split_audio,
|