Update app.py
Browse files
app.py
CHANGED
|
@@ -552,4 +552,24 @@ async def root():
|
|
| 552 |
"""Root endpoint with API information"""
|
| 553 |
return {
|
| 554 |
"message": "TTS API with Coqui TTS and Voice Cloning",
|
| 555 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 552 |
"""Root endpoint with API information"""
|
| 553 |
return {
|
| 554 |
"message": "TTS API with Coqui TTS and Voice Cloning",
|
| 555 |
+
"endpoints": {
|
| 556 |
+
"POST /api/tts": "Generate TTS for a single text",
|
| 557 |
+
"POST /api/batch-tts": "Generate TTS for multiple texts",
|
| 558 |
+
"POST /api/upload-voice": "Upload a voice sample for cloning",
|
| 559 |
+
"POST /api/clone-voice": "Clone a voice from multiple samples",
|
| 560 |
+
"GET /api/voices": "List available voices",
|
| 561 |
+
"GET /api/health": "Health check"
|
| 562 |
+
},
|
| 563 |
+
"model_loaded": tts is not None,
|
| 564 |
+
"model_name": current_model if tts else "None",
|
| 565 |
+
"voice_cloning_supported": supports_voice_cloning()
|
| 566 |
+
}
|
| 567 |
+
|
| 568 |
+
if __name__ == "__main__":
|
| 569 |
+
import uvicorn
|
| 570 |
+
print("π Starting TTS API with Coqui TTS and Voice Cloning...")
|
| 571 |
+
print("π API endpoints available at: http://localhost:7860/")
|
| 572 |
+
print("π Documentation available at: http://localhost:7860/docs")
|
| 573 |
+
print(f"π Model: {current_model}")
|
| 574 |
+
print(f"ποΈ Voice cloning: {'Supported' if supports_voice_cloning() else 'Not supported'}")
|
| 575 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|