iaratts-roadmap / PHASE1_NORMALIZER.md
marcosremar2's picture
Upload folder using huggingface_hub
71c511c verified
|
Raw
History Blame Contribute Delete
2.11 kB
# IaraTTS Phase 1 — Text Normalizer (RESULTS)
> Implemented `iaratts/normalizer/pt_br.py`: pt-BR specific text normalization
> via num2words, custom date/time patterns, abbreviation expansion, currency.
## Setup
- 50 prompts (`prompts/ptbr-50.json`), Bella voice (best baseline)
- Same model (MOSS-TTS-Nano-100M-ONNX), Whisper-small round-trip
- A/B: same input prompts, normalizer ON vs OFF
## Results
| | Baseline | Phase 1 | Δ |
|---|---:|---:|---:|
| WER | 0.336 | **0.336** | **+0.000** |
| RTF | 0.620 | 0.422 | -0.198 |
| SCORE | 1.148 | 1.264 | +0.117 (RTF only) |
**WER unchanged.** Per-category breakdown reveals offsetting effects:
### Phase 1 wins (lower WER)
| Category | Δ WER |
|---|---:|
| hard_consonants | -0.334 |
| complex | -0.190 |
| emotion | -0.168 |
| lh_nh | -0.110 |
| long | -0.025 |
### Phase 1 regressions (worse)
| Category | Δ WER |
|---|---:|
| abbrev | +0.237 |
| dates | +0.214 |
| open_close | +0.191 |
| r_strong | +0.150 |
## Why no overall WER improvement
- **Whisper tolerates both forms.** "Dr. João" vs "doutor João" — whisper
transcribes either as "doutor João", so the round-trip masks the
underlying pronunciation difference. WER is not measuring what we wanted.
- **Some expansions hurt.** Spelling out "26/04/2026" → "vinte e seis de
abril de dois mil e vinte e seis" creates a long sequence the AR model
occasionally botches mid-decoding (more frames = more drift).
## Conclusion
Phase 1 produced cleaner pronunciation for human listeners (validated
informally on hard_consonants samples) but WER round-trip cannot measure
this. **Real signal will come from Phase 2** (LoRA fine-tune on Erinome
dataset) where the model learns native pt-BR phonology end-to-end.
The normalizer code stays valuable as Phase 2 input pipeline (training
transcripts will go through it for consistency).
## Phase 1 — DONE ✓
- [x] pt-BR normalizer implemented (`normalizer/pt_br.py`, 8 self-tests pass)
- [x] WER A/B vs baseline measured
- [x] Per-category analysis done
- [x] Conclusion: WER neutral but normalizer kept for Phase 2 pipeline