Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -70,17 +70,6 @@ def apply_treble_boost(audio, gain=10):
|
|
70 |
def save_temp_wav(audio, path):
|
71 |
audio.export(path, format="wav")
|
72 |
|
73 |
-
# Vocal Isolation using spleeter
|
74 |
-
def apply_vocal_isolation(audio_path):
|
75 |
-
output_dir = tempfile.mkdtemp()
|
76 |
-
cmd = ["spleeter", "separate", "-o", output_dir, audio_path]
|
77 |
-
subprocess.run(cmd)
|
78 |
-
vocal_path = os.path.join(output_dir, os.path.basename(audio_path).replace(".wav", ""), "vocals.wav")
|
79 |
-
if os.path.exists(vocal_path):
|
80 |
-
return vocal_path
|
81 |
-
else:
|
82 |
-
raise Exception("Vocal isolation failed.")
|
83 |
-
|
84 |
# Main processing function
|
85 |
def process_audio(audio_file, effect):
|
86 |
audio = AudioSegment.from_file(audio_file)
|
|
|
70 |
def save_temp_wav(audio, path):
|
71 |
audio.export(path, format="wav")
|
72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
# Main processing function
|
74 |
def process_audio(audio_file, effect):
|
75 |
audio = AudioSegment.from_file(audio_file)
|