| 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() | |