Spaces:
Sleeping
Sleeping
| 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()) |