Spaces:
Runtime error
Runtime error
| from TTS.api import TTS | |
| import gradio as gr | |
| # Charger le modèle | |
| tts = TTS(model_name="IbrahimSalah/F5-TTS-Arabic") | |
| # Fonction de synthèse | |
| def synthesize(text): | |
| output_path = "output.wav" | |
| tts.tts_to_file(text, file_path=output_path) | |
| return output_path | |
| # Interface Gradio | |
| demo = gr.Interface(fn=synthesize, | |
| inputs=gr.Textbox(label="Texte en arabe"), | |
| outputs=gr.Audio(type="filepath"), | |
| title="TTS Arabe avec F5") | |
| demo.launch() | |