This Space runs a local XTTS-v2 TTS model using Flask and exposes a simple API:
/tts?text=Hello&gender=male|female
You can also use the optional Gradio interface with app.py.
app.py