File size: 551 Bytes
4a8e3c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from f5_tts.infer.api import TTS  # adjust if your module is in a subfolder

tts = TTS()  # load your model here

def generate_voice(text):
    # Example: generate audio file from text
    output_path = "output.wav"
    tts.infer(text=text, output_path=output_path)
    return output_path

iface = gr.Interface(
    fn=generate_voice,
    inputs=gr.Textbox(label="Enter text"),
    outputs=gr.Audio(label="Generated Voice"),
    title="Foxii Voice Clone",
    description="Custom voice cloning powered by F5-TTS"
)

iface.launch()