From e6bf7c3d9ca29ea6561642d784e689f9ee2522ff Mon Sep 17 00:00:00 2001 From: Dennis Thiessen Date: Wed, 18 Feb 2026 13:15:40 +0100 Subject: [PATCH] improved visualization in admin menu and change model of transcribe --- backend/.env.example | 2 +- backend/app/config.py | 2 +- backend/app/services/voice_service.py | 1 + frontend/css/style.css | 9 +++++++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/backend/.env.example b/backend/.env.example index 71080a2..def5dc3 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -25,7 +25,7 @@ OPENAI_API_KEY=sk-... VOICE_MODE=browser TTS_MODEL=tts-1 TTS_VOICE=alloy -STT_MODEL=whisper-1 +STT_MODEL=gpt-4o-mini-transcribe # Admin bootstrap (only used on first startup) ADMIN_EMAIL=admin@fluentgerman.ai diff --git a/backend/app/config.py b/backend/app/config.py index ab42101..af11b22 100644 --- a/backend/app/config.py +++ b/backend/app/config.py @@ -35,7 +35,7 @@ class Settings(BaseSettings): voice_mode: Literal["api", "browser"] = "api" tts_model: str = "tts-1" tts_voice: str = "alloy" - stt_model: str = "whisper-1" + stt_model: str = "gpt-4o-mini-transcribe" # Admin bootstrap admin_email: str = "admin@fluentgerman.ai" diff --git a/backend/app/services/voice_service.py b/backend/app/services/voice_service.py index 55aace1..fb4d7e5 100644 --- a/backend/app/services/voice_service.py +++ b/backend/app/services/voice_service.py @@ -26,6 +26,7 @@ async def transcribe(audio_bytes: bytes, filename: str = "audio.webm") -> str: transcript = await client.audio.transcriptions.create( model=settings.stt_model, file=audio_file, + prompt="FluentGerman.ai — German language tutor. Deutsch, Grammatik, Übung, Aussprache.", ) return transcript.text diff --git a/frontend/css/style.css b/frontend/css/style.css index 208e875..3fead82 100644 --- a/frontend/css/style.css +++ b/frontend/css/style.css @@ -631,6 +631,15 @@ textarea { animation: recordPulse 1.8s infinite; } +/* Admin voice-record button */ +.btn.recording { + background: linear-gradient(135deg, #fb7185, #e11d48) !important; + color: #fff !important; + border-color: transparent !important; + box-shadow: 0 0 0 0 rgba(251, 113, 133, 0.5); + animation: recordPulse 1.8s infinite; +} + .mic-btn.hidden { display: none; }