We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21ec3c6 commit a58d6edCopy full SHA for a58d6ed
1 file changed
app.py
@@ -130,6 +130,18 @@ async def create_speech_api(request: SpeechRequest):
130
filename=f"{request.voice}_{timestamp}.wav"
131
)
132
133
+@app.get("/v1/audio/voices")
134
+async def list_voices():
135
+ """Return list of available voices"""
136
+ if not AVAILABLE_VOICES or len(AVAILABLE_VOICES) == 0:
137
+ raise HTTPException(status_code=404, detail="No voices available")
138
+ return JSONResponse(
139
+ content={
140
+ "status": "ok",
141
+ "voices": AVAILABLE_VOICES
142
+ }
143
+ )
144
+
145
# Legacy API endpoint for compatibility
146
@app.post("/speak")
147
async def speak(request: Request):
0 commit comments