feat: chatpipeline chat2tts flow

This commit is contained in:
verachen
2025-01-13 11:20:15 +08:00
parent 37174413fe
commit 30412af156
3 changed files with 101 additions and 132 deletions

View File

@ -47,10 +47,11 @@ async def blackbox(blackbox_name: Union[str, None] = None, request: Request = No
# else:
# return JSONResponse(content={"error": f"{filename} not found"}, status_code=status.HTTP_404_NOT_FOUND)
@app.get("/audio/{filename}")
@app.get("/audio/audio_files/{filename}")
async def serve_audio(filename: str):
import os
import aiofiles
filename = os.path.join("audio_files", filename)
# 确保文件存在
if os.path.exists(filename):
try: