Spaces:
Configuration error
Configuration error
File size: 647 Bytes
e5b7959 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
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()
|