Add per-user whisper settings for hotwords and initial prompt
This commit introduces the capability to configure user-specific Whisper settings, including language, hotwords, and initial prompts. These settings are stored in `users.toml` and are passed to the Whisper service for more tailored transcription results. New unit tests have been added to verify that the `transcribe` function correctly forwards these optional settings to the Whisper client and omits them when they are not provided. Additionally, a new directory `tests/fixtures/dictations` has been created to store M4A audio files, their expected transcripts, and associated hotword files. This serves as a regression corpus for the Whisper pipeline. A README file explains the structure and conventions for adding new fixtures. Several new fixtures have been added, covering various medical domains and transcription scenarios.
This commit is contained in:
@@ -725,6 +725,7 @@ axum-extra = { version = "0.12", features = ["cookie"] } # passend zu axum 0.8
|
||||
- [ ] Ollama Health-Check + Retry
|
||||
- [ ] Lazy Cleanup bei Falllisten-Zugriff (zum Entfernen markierte Fälle vom Vortag löschen)
|
||||
- [ ] Retention-Prüfung bei Zugriff (Audio/Transkripte nach RETENTION_*_DAYS)
|
||||
- [x] Per-User Whisper-Settings in `users.toml` (`[user.whisper]` mit `language`, `hotwords`, `initial_prompt`) — Worker reicht sie pro Upload an den `whisper/`-Service durch
|
||||
|
||||
### Phase 2b.5 — Eigener faster-whisper-Service (`whisper/`)
|
||||
- [x] FastAPI-Wrapper um `faster-whisper` mit fest verdrahteten Anti-Halluzinations-Params (`condition_on_previous_text=False`, `temperature=0.0`, `vad_filter=True`)
|
||||
@@ -880,3 +881,4 @@ axum-extra = { version = "0.12", features = ["cookie"] } # passend zu axum 0.8
|
||||
| faster-whisper Port | 10300 (ahmetoner) | 9001 (eigener Service) | Neuer Service auf freiem Port; alter Container optional parallel belassen. |
|
||||
| Test-Client für Watch-Flow | Erst ab Phase 5 mit echter Hardware | `scripts/dictate.sh` ab Phase 2/3 als Stand-in (ffmpeg + curl + interaktiver c/n/r/q-Loop) | Erlaubt End-to-End-Tests der Server-Pipeline ohne Watch-Hardware, solange die Pixel Watch nicht verfügbar ist. |
|
||||
| Admin-Log vs. Arzt-UI | Nur Arzt-UI geplant | Zusätzlich frühes Admin-Log unter `/web/` (flache Liste aller Fälle, Transkripte, Oneliner) | Gebaut, bevor das Arzt-UI (Session, States, Fall-Detail) existiert, um die Pipeline während Entwicklung inspizieren zu können. Soll bleiben, aber später hinter `role = "admin"` geschützt; das Arzt-UI wird separat entwickelt. |
|
||||
| Hotwords | Nicht vorgesehen | Per-User-Feld `[user.whisper].hotwords` in `users.toml` | Experiment zeigte: Hotwords sind der einzige Hebel, der Whisper-Fachvokabular zuverlässig verbessert (8/8 vs. 3/8 ohne). Pro-User statt global, weil Kardiologie/Orthopädie/Psychiatrie völlig andere Begriffslisten brauchen. Gleiches Schema lässt sich später auf `[user.oneliner]` erweitern. |
|
||||
|
||||
Reference in New Issue
Block a user