feat(tts): Aussprache-Normalisierung vor Piper (Ordinalia/Einheiten/Abk./Lexikon)
In-Process-Layer ausgebaut statt neuer Lib/CLI. Leitprinzip: nicht duplizieren,
was espeak-ng schon kann (Kardinal-/Dezimalzahlen bleiben unangetastet) -- nur die
belegten Luecken fuellen.
- german_numbers.py: deutsche Ordinalzahlen 1.-31. (attributiv/adverbial)
- tts_normalizer.py: Ordinalia (Datum '1. Mai'->'erster Mai', Folgen '1. 2. 3.'->
'erstens, zweitens, ...'), Einheiten nach Zahl (kg/km/km-h/...), Abkuerzungen
(Dr./z.B./usw.), optionales YAML-Lexikon (config/pronunciation.<lang>.yaml).
Provider-abhaengige Stufen auto|full|light|off (TTS_NORMALIZE_LEVEL): piper=full,
Cloud=light (laesst Zahlen/Abk. fuer das Cloud-Modell in Ruhe).
- spoken_response_adapter.py: nummerierte Listen -> Ordinalwoerter statt Loeschen.
- sentence_chunker.py: trennt nicht mehr nach Ziffer+Punkt, Einzelbuchstabe+Punkt
('z. B.', Initialen) oder bekannten Abkuerzungen -> behebt das Streaming-Symptom
('1.' wurde als eigener 'Satz' zu 'eins').
- orchestrator/dependencies: normalize_level durchgereicht (auto: piper->full).
- Tests: tests/test_tts_normalizer.py + Chunker-Faelle (85 gruen).
- Doku: BEDIENUNGSANLEITUNG (Aussprache verbessern), .env.example.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
cca423dac3
commit
c9d8552ec7
13 changed files with 411 additions and 56 deletions
12
config/pronunciation.en.yaml
Normal file
12
config/pronunciation.en.yaml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# Pronunciation lexicon (English) for TTS normalization before piper.
|
||||
# Grundgerüst – entries here extend/override the normalizer's built-in defaults.
|
||||
# Only applied for local TTS (piper, level "full").
|
||||
|
||||
abbreviations:
|
||||
# "approx.": "approximately"
|
||||
|
||||
units:
|
||||
# "kWh": "kilowatt hours"
|
||||
|
||||
terms:
|
||||
# "SQL": "sequel"
|
||||
Loading…
Add table
Add a link
Reference in a new issue