Commit 966a23d
feat: Arabic diacritization via text2tashkeel (rawi); drop vendored libtashkeel
Replace the vendored libtashkeel with text2tashkeel for all Arabic tashkeel. The
default model is rawi-ensemble, which restores hamza and the dagger alef in addition
to the standard marks — so it fixes inconsistently-spelled input that libtashkeel's
15-class scheme left as-is (e.g. bare 'ا' -> 'أ').
- remove phoonnx/thirdparty/tashkeel/ (vendored libtashkeel + its 4.8 MB onnx).
- BasePhonemizer: a lazy text2tashkeel diacritizer; add_diacritics(text, lang,
model=None) routes Arabic to it.
- config: a generic 'diacritizer_model' key (default rawi-ensemble) on VoiceConfig
and SynthesisConfig, round-tripped through config and threaded through voice.py —
named generically so future languages that need a diacritizer model reuse it.
- the [ar] extra requires text2tashkeel; a clear ImportError is raised if missing.
Config and Arabic phonemizer tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent b2faeef commit 966a23d
11 files changed
Lines changed: 43 additions & 340 deletions
File tree
- phoonnx
- phonemizers
- thirdparty/tashkeel
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
256 | 258 | | |
257 | 259 | | |
258 | 260 | | |
| 261 | + | |
259 | 262 | | |
260 | 263 | | |
261 | 264 | | |
| |||
264 | 267 | | |
265 | 268 | | |
266 | 269 | | |
| 270 | + | |
267 | 271 | | |
268 | 272 | | |
269 | 273 | | |
| |||
394 | 398 | | |
395 | 399 | | |
396 | 400 | | |
| 401 | + | |
397 | 402 | | |
398 | 403 | | |
399 | 404 | | |
| |||
443 | 448 | | |
444 | 449 | | |
445 | 450 | | |
| 451 | + | |
446 | 452 | | |
447 | 453 | | |
448 | 454 | | |
| |||
490 | 496 | | |
491 | 497 | | |
492 | 498 | | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
493 | 502 | | |
494 | 503 | | |
495 | 504 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
15 | 14 | | |
| |||
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | | - | |
| 23 | + | |
25 | 24 | | |
26 | 25 | | |
27 | 26 | | |
28 | | - | |
29 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
30 | 31 | | |
| 32 | + | |
31 | 33 | | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
43 | 57 | | |
44 | 58 | | |
45 | 59 | | |
| |||
48 | 62 | | |
49 | 63 | | |
50 | 64 | | |
51 | | - | |
| 65 | + | |
| 66 | + | |
52 | 67 | | |
53 | 68 | | |
54 | 69 | | |
55 | | - | |
| 70 | + | |
56 | 71 | | |
57 | 72 | | |
58 | 73 | | |
| |||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments