Improve deployment safety and chat reliability
Deploy FluentGerman.ai / deploy (push) Successful in 1m25s

This commit is contained in:
2026-08-29 17:28:50 +02:00
parent e9f12bc2ba
commit d974aaedc8
15 changed files with 746 additions and 153 deletions
+3 -3
View File
@@ -7,7 +7,7 @@ from fastapi.responses import Response
from app.auth import require_admin, get_current_user
from app.config import get_settings
from app.models import User
from app.schemas import VoiceConfigOut, VoiceInstructionRequest
from app.schemas import SynthesizeRequest, VoiceConfigOut, VoiceInstructionRequest
from app.services.llm_service import summarize_instruction
from app.services.voice_service import synthesize, transcribe
@@ -48,12 +48,12 @@ async def transcribe_audio(
@router.post("/synthesize")
async def synthesize_text(
text: str,
body: SynthesizeRequest,
user: User = Depends(get_current_user),
):
"""Convert text to speech audio (API mode only)."""
try:
audio_bytes = await synthesize(text)
audio_bytes = await synthesize(body.text)
return Response(content=audio_bytes, media_type="audio/mpeg")
except Exception as e:
logger.error(f"Synthesis failed: {str(e)}", exc_info=True)