Spaces:
Configuration error
Configuration error
| import gradio as gr | |
| import os | |
| from inference import infer_main # This should already exist in your repo | |
| def generate_voice(text, reference_audio): | |
| output_path = infer_main(reference_audio.name, text) | |
| return output_path | |
| iface = gr.Interface( | |
| fn=generate_voice, | |
| inputs=[ | |
| gr.Textbox(label="Text"), | |
| gr.Audio(label="Reference Speaker Audio", type="filepath") | |
| ], | |
| outputs=gr.Audio(label="Generated Voice", type="filepath"), | |
| title="OpenVoice (Orpheus) - Real-time Voice Cloning", | |
| description="Upload a short reference audio (2–5 sec), type any text, and get the cloned voice output." | |
| ) | |
| iface.launch() | |