diff --git a/docs/CURRENT_SYSTEM.md b/docs/CURRENT_SYSTEM.md index 5dce947..99a3ceb 100644 --- a/docs/CURRENT_SYSTEM.md +++ b/docs/CURRENT_SYSTEM.md @@ -75,6 +75,12 @@ Full fresh-host restore qualification remains open; this live limit check is not an end-to-end restore test. Rollback is the same live Docker update plus manifest fields set to the former 44g values, only after ensuring usage fits the lower cap. +## Technical TTS clarification · 21 October 2026 + +Explicit timezone letters, audio format names, known literal log fields, numeric +seconds and paired bitrate values are covered by 37 passing preparation/routing +tests. [Scope, validation and restore](maintenance/2026-10-21-tts-technical.md). + ## Technical TTS vocabulary · 19 October 2026 Central speech preparation now distinguishes MB/MiB/Mbit and rate suffixes, diff --git a/docs/maintenance/2026-10-21-tts-technical.md b/docs/maintenance/2026-10-21-tts-technical.md new file mode 100644 index 0000000..ce651d3 --- /dev/null +++ b/docs/maintenance/2026-10-21-tts-technical.md @@ -0,0 +1,30 @@ +# Technical speech clarification · 21 October 2026 + +Shared German speech preparation adds explicit letter names for CEST, CET, UTC, +MESZ, MEZ, MP3/mp3 and PCM. API/MCP is spoken as two letter sequences. +Known literal log fields (transcoding, format, tracksImported, tracksMissing, +RestartCount) receive spoken labels and explicit values: false remains falsch, +true remains wahr, raw becomes unverändert. This never infers service health. +Numeric seconds are expanded; paired bit rates repeat the unit on both numbers +(128/256 kbps → 128 Kilobit pro Sekunde oder 256 Kilobit pro Sekunde). + +The optional shared endpoint enhancer applies technical normalization again after +removing inline backticks, so inline log fields are included. URL, path, filename +and entity-ID protections remain; no arbitrary code interpreter or LLM is added. +Rules remain idempotent and German-only. No displayed message or Mac app changes. +No attempt is made to phoneticize every product name or guarantee TTS fidelity. + +Verification: 37 tests pass with +`python3 -m unittest test_speech_text test_tts_text_enhancer test_speech_mp3 test_speech_reference`. +The user's entire Navidrome report was prepared offline; private input/audio stay +outside version control. Live synthesis/STT validation is recorded after activation. + +Operation: speech_text.py and tts_text_enhancer.py already belong to the installer +allowlist. On this deployment, update the canonical source then use the existing +installer update with reuse-runtime. Check endpoint active/queued requests before +stopping; do not interrupt active work. Existing profiles, weights, voice and +endpoint settings are retained. Normal rollback uses the previous image. +Native Debian uses the same application modules, without additional packages, +with an application restart in an idle maintenance window. Restore requires this +revision plus the existing private state/voice restore package. Fresh-Debian full +restore qualification remains an existing open platform task. diff --git a/speech_text.py b/speech_text.py index 65c06cb..98f640a 100644 --- a/speech_text.py +++ b/speech_text.py @@ -172,6 +172,10 @@ def prepare_technical_german(text: str) -> str: 'μs': 'Mikrosekunden', 'ns': 'Nanosekunden', } vocab = { + 'CEST': 'Ce E Es Te', 'CET': 'Ce E Te', 'UTC': 'U Te Ce', + 'MESZ': 'Em E Es Zett', 'MEZ': 'Em E Zett', + 'MP3': 'Em Pe drei', 'mp3': 'Em Pe drei', 'PCM': 'Pe Ce Em', + 'API/MCP': 'A Pe I und Em Ce Pe', 'CPU': 'Ce Pe U', 'GPU': 'Ge Pe U', 'RAM': 'Arbeitsspeicher', 'VRAM': 'Grafikspeicher', 'SSD': 'Es Es De', 'HDD': 'Ha De De', 'NVMe': 'En Vau Em E', 'USB': 'U Es Be', 'PCIe': 'Pe Ce I Express', @@ -199,6 +203,20 @@ def prepare_technical_german(text: str) -> str: # B/s and bit/s are only meaningful as units after a numeric quantity. unit_pattern = '|'.join(re.escape(k) for k in sorted(units, key=len, reverse=True)) def prose(value): + # Restrict log-field rules to known names and literal values. + fields = {'transcoding': 'Transkodierung', 'format': 'Format', + 'tracksImported': 'importierte Titel', 'tracksMissing': 'fehlende Titel', + 'RestartCount': 'Neustarts'} + value = re.sub( + r'(?