Docs: SpokenKokoroTTSService number normalization
Document the TTS number-reading fix in the "already solved" section: phone numbers, street numbers, and zips are spoken digit-by-digit (no "dash"/parens, country code dropped); dates/times left natural. tts_normalize() holds the rules. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,14 @@ output, falls back to JSONL if Odoo is unreachable. Keep it.
|
||||
**Odoo integration (`odoo_client.py`)** — already uses `ODOO_API_KEY` for XML-RPC auth,
|
||||
not password. Correct pattern. No changes.
|
||||
|
||||
**`SpokenKokoroTTSService` in `bot.py`** — number normalization for speech. Kokoro reads
|
||||
raw digit strings as cardinals with symbols spoken aloud ("983-4969" → "nine hundred
|
||||
eighty-three dash forty-nine sixty-nine"). This subclass normalizes the text in `run_tts`
|
||||
(which receives the full sentence) so US phone numbers and 4–5 digit runs (street numbers,
|
||||
zips) are spoken one digit at a time — country code dropped, no "dash"/parens; dates and
|
||||
times left natural ("Monday the fifth", "three thirty"). Deterministic, so it's robust to
|
||||
whatever the model emits. Keep it. `tts_normalize()` holds the rules.
|
||||
|
||||
---
|
||||
|
||||
## Change 1 — Real-time STT stays on Whisper (`bot.py`)
|
||||
|
||||
Reference in New Issue
Block a user