File size: 1,362 Bytes
ec1aa0d
4dd2e8c
ec1aa0d
 
a98e0bf
4dd2e8c
ec1aa0d
 
caf3c74
 
ede665b
3f385ef
560f798
a98e0bf
560f798
 
 
 
ede665b
 
560f798
 
 
 
 
 
ede665b
560f798
ec1aa0d
560f798
ede665b
 
6b6018f
ede665b
 
3f385ef
 
caf3c74
 
3f385ef
ede665b
ec1aa0d
560f798
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import gradio as gr
from audio_separator.separator import Separator
import os

def aura_separate_beta(audio_path):
    if audio_path is None:
        return None, None
    
    base_name = os.path.splitext(os.path.basename(audio_path))[0]
    
    separator = Separator(output_format='MP3')
    
    try:
        model_name = 'UVR-MDX-NET-Inst_HQ_3.onnx' 
        separator.load_model(model_name)
        
        output_files = separator.separate(audio_path)
        
        v_final = f"{base_name} (Vocals) (Aura-V1-Beta).mp3"
        i_final = f"{base_name} (Instrumental) (Aura-V1-Beta).mp3"
        
        os.rename(output_files[0], v_final)
        os.rename(output_files[1], i_final)
        
        return v_final, i_final
    except Exception as e:
        print(f"โŒ Errore: {e}")
        return None, None

with gr.Blocks() as demo:
    gr.Markdown("# ๐ŸŒŒ Aura Engine v0.96 (BETA)")
    gr.Markdown("Output: **MP3 High Quality** | Brand: **ALEeMAYAyt**")
    
    input_audio = gr.Audio(label="Traccia Input", type="filepath")
    btn = gr.Button("GENERA CON AURA", variant="primary")
    
    with gr.Row():
        v_out = gr.Audio(label="๐ŸŽค Vocals")
        i_out = gr.Audio(label="๐ŸŽธ Instrumental")

    btn.click(fn=aura_separate_beta, inputs=input_audio, outputs=[v_out, i_out], api_name="predict")

demo.launch(theme=gr.themes.Soft())