updated voice, avatar and frontend to reflect changes
Some checks failed
Deploy FluentGerman.ai / deploy (push) Failing after 51s

This commit is contained in:
2026-02-16 20:23:46 +01:00
parent 84cd052ded
commit a708f84a07
5 changed files with 65 additions and 13 deletions

View File

@@ -18,7 +18,17 @@ router = APIRouter(prefix="/api/voice", tags=["voice"])
@router.get("/config", response_model=VoiceConfigOut)
async def voice_config(user: User = Depends(get_current_user)):
"""Return current voice mode so frontend knows whether to use browser or API."""
return VoiceConfigOut(voice_mode=get_settings().voice_mode)
settings = get_settings()
# API STT (Whisper) works with OpenAI-compatible providers
api_available = bool(
settings.voice_mode == "api"
and settings.llm_api_key
and settings.llm_provider in ("openai",)
)
return VoiceConfigOut(
voice_mode=settings.voice_mode,
voice_api_available=api_available,
)
@router.post("/transcribe")

View File

@@ -90,3 +90,4 @@ class VoiceInstructionRequest(BaseModel):
class VoiceConfigOut(BaseModel):
voice_mode: str # "api" | "browser"
voice_api_available: bool = False # True if API STT (Whisper) is configured