Restore German speech notation from legacy TTS gateway

This commit is contained in:
Mikei386 committed 2026-10-06 14:22:41 +02:00
1 parent 41dd7471cd
commit a0056fa56f
6 files changed
+323 -3

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
# German speech notation
Deck prepares spoken text in `speech_text.prepare_for_speech` before both complete-WAV and streaming TTS generation. Chat text is unchanged. The normalization was ported from the deployed old `mike-ai-tts-gateway` and its `prepare_for_qwen_speech` path.
German examples:
- `29 km/h` → `29 Kilometer pro Stunde`
- `15°–23 °C` → `15 bis 23 Grad`
- `22° / 10°` → `Höchstwert 22 Grad, Tiefstwert 10 Grad`
- `16:09 Uhr` → `16 Uhr 9`
- `05–06 Uhr` → `5 bis 6 Uhr`
- `04.–05.09.` → `4. bis 5. September`
The preparation also handles percentages, IPv4 addresses, postal codes, aspect-ratio cues, selected abbreviations and Markdown. German expansions apply only to German language settings. Hyphenated words retain their punctuation for Qwen prosody. Chunking preserves ordinal dates such as `5. Oktober`.
Validation: 78 speech/endpoint unit tests and two NumPy PCM streaming tests passed on Athena in isolated containers. The upload regression test verifies that valid PCM WAV input retains every frame, including the beginning.
## OpenWebUI recording onset investigation (2026-10-06)
The installed OpenWebUI v0.11.4 conversation recorder starts MediaRecorder after sound is detected and has no pre-roll audio buffer. This can truncate initial speech. Normal dictation starts after asynchronous microphone initialization; speech before recording is ready is not captured. The user reports normal dictation succeeds with a one-second pause but conversation mode mangles the first word.
This is consistent with client-side onset clipping, but the user's original uploaded audio has not been captured and inspected, so an ASR contribution is not ruled out. No OpenWebUI patch was applied. Missing samples cannot be reconstructed in the router.
Official source:
- https://github.com/open-webui/open-webui/blob/v0.11.4/src/lib/components/chat/MessageInput/CallOverlay.svelte
- https://github.com/open-webui/open-webui/blob/v0.11.4/src/lib/components/chat/MessageInput/VoiceRecording.svelte
A similar user report (not proof of the cause here): https://github.com/open-webui/open-webui/discussions/24469