English read the leading group of '10 000' on its own and left the zero group behind ('ten 000'). Runs whose groups are all '000' are now kept as written, like '1,000'.
Rewritten from a behavioural spec by an implementer without access to the
removed code, so every line has CLA-covered provenance: memmap-staged dub
assembly and segment cache, the native Malayalam number verbalizer, the
OpenAI-compatible speech extension controls forwarded to the GGUF engine,
and the opt-in ROCm torch swap in source setup.
(cherry picked from commit 0d4d3b00cb536f8974e1495aba1f05cabe3d0f1d)
Removes code from contributors without a CLA on file, leaving CLEAN-ROOM markers where the reimplementation goes.
(cherry picked from commit f209084aa188804271d4f71f7acaaa7b1bbeb6c8)
Rebuilt from a behaviour spec by an implementer who never saw the removed code (batch P: #1874, #1962 and related).
(cherry picked from commit 6ff283caa0819485fdf737caa9ac12ea15fd21b2)
Removes code from contributors without a CLA on file, leaving CLEAN-ROOM markers where the reimplementation goes.
(cherry picked from commit f954c3ea6fd1bc64f9f757d4f2ee74567fd2ba7d)
"12 500%" went through the percent rule first, which spoke the last
group on its own. The grouped span now covers an optional percent sign
and both rules skip anything inside it. Changelog line carries the PR ref.
"1 234" and "10 000" were split by the integer rule, which read the
leading group on its own ("un 234,5", "dix 000 habitants"). A 1-3 digit
group followed by 3-digit groups now stays as written in the locales
that group thousands with a period, the same treatment "1.000" gets.
"Am 3. Mai" became "Am drei. Mai": the cardinal plus a leftover period
the engine reads as a sentence break. In the locales that mark ordinals
with a period (de, da, no, fi, cs, pl) a 1-31 day followed by a month
name now keeps its digits, since the spoken ordinal inflects with the
phrase. Years and other numbers in the sentence still speak.
num2words has no Urdu locale, so Urdu text reached OmniVoice with raw
digits and was mispronounced (1956 heard as "انیس سو سپنس"), while the
same sentence written in Urdu words transcribed back with 0% CER.
Add services/number_words_ur.py, modeled on the Malayalam module and
wired through _NATIVE_VERBALIZERS:
- full 100-entry table for the irregular 0-99 cardinals
- سو / ہزار / لاکھ with Indian grouping up to 999,999
- 1100-1999 read in hundreds (1956 → انیس سو چھپن)
- decimals with اعشاریہ, percentages with فیصد
"Urdu", "ur" and "ur-PK" resolve to the native path. Tests cover change
and leave-unchanged cases, Extended Arabic-Indic digits, spot checks, and
the full 0-999999 range (no digits, no Arabic look-alike letters).
Consolidate community engine, workflow, dictation, and setup fixes with the Electron composer, sidebar, and voice UI.
Fix review findings in engine residency, remote exports, backup cleanup, bounded compressed-audio decoding, and reference preprocessing. Preserve contributor credits in CHANGELOG.md and leave the app version unchanged.
Supersedes #2325, #2338, #2368, #2377, #2379, #2380, #2383, #2384, #2387, #2390, #2391, #2392, #2393, #2395, #2400, #2401, #2402, #2409, #2410, and #2412.
Every vetted num2words locale except English writes decimals with a comma
and groups thousands with a period, but the decimal and percent rules read
"1.000" as 1.0 there: "10.000 Menschen" was spoken as ten people and
"2.500 Euro" as two and a half euros. A period before exactly three digits
is a thousands group in those locales and now keeps its digits, as "1,000"
already does in English.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* feat(tts): Malayalam number verbalization (native verbalizer)
num2words has no ml locale, so Malayalam dubs/audiobooks reached the engine with raw digits. Adds services/number_words_ml.py (cardinals 0-999999 with sandhi, lakh grouping, decimals, percent) and a _NATIVE_VERBALIZERS hook in text_normalization that reuses the existing conservative regexes and bracket masking.
* feat(dub): add ml to TRANSLATE_CODES for the Fast translator
* test(tts): Malayalam number verbalization cases
* docs(tts): docstrings for the Malayalam verbalizer helpers
* fix(tts): keep numbers glued to combining marks and native leading zeros as digits
Python's \w misses Unicode combining marks, so '10ാം' became 'പത്ത്ാം' and
native-digit codes like '൦൦൭' / '٠٠٧' bypassed the ASCII-only (?!0\d) guard.
Guard both the num2words and native paths; add regression cases and the
changelog entry for #2280.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs(changelog): add Unreleased highlights for #2280
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* test(tts): simplify ml sweep range
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
* docs(structure): count the Malayalam number-words service
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Palash Debnath <4178343+debpalash@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
"20~30초" is read aloud as a single number — OmniVoice says "이십삼" (23).
The separator never reaches the listener, so any written range is heard as
the wrong figure.
`normalize_text` only ran its number pass behind `_num2words_lang`, which
returns None for ko/ja/zh/th/vi (those scripts read digits natively and are
deliberately outside num2words). Nothing else looked at the range mark, so
the tilde went to the engine untouched and the two numbers ran together.
Rewrite `N~M` into the spoken form before the engine sees it, outside the
num2words gate so the CJK languages are covered too. Verified by rendering
each candidate and transcribing it back (ko, OmniVoice, cloned voice):
"대략 20~30초짜리" heard "23초" WRONG
"대략 20-30초짜리" heard "23초" WRONG (reproduces it)
"대략 20에서 30초짜리" heard "20에서 30초짜리" correct
"20〜30分ぐらい" → "20から30分" heard "20〜30分くらい" correct
Deliberately narrow:
* Only the tilde family (U+007E, U+301C, U+FF5E). Japanese and Korean IMEs
emit the latter two. An ASCII hyphen is left alone — between digits it
also spells dates, phone numbers and product codes, where "to" is wrong
(`tests` already pin "pages 3-5" as unchanged).
* Only languages with a verified spoken form (ko/ja/zh/en). Anything else
keeps its tilde, matching how `_PERCENT_WORD` is scoped.
* Spacing belongs to the form, not the caller: a Korean postposition binds
to its numeral ("20에서 30"), Japanese and Chinese set no spaces, English
needs them on both sides.
* Neighbour guards block digits and ASCII letters but allow CJK, because
CJK writes the unit hard against the digits ("20~30초"); a `\w` guard
rejects exactly the cases the rule exists for.
`ko`/`ja`/`zh` join `_FULL_NAME_TO_CODE` so the new resolver can see them.
They stay out of `_NUM2WORDS_LANGS`, so this does not open a num2words path
for them — the same inert-entry pattern the file already documents for
"vietnamese".
`backend/services/text_normalization.py` joins the functional-CJK allowlist
in tests/test_no_hardcoded_cjk.py, under the text-processing group and by
the procedure that file documents: the range words are engine input, not
user-facing UI strings.
Tests: 7 new change-cases and 8 new leave-unchanged cases (hyphen, date,
phone number, product code, decimals, a non-numeric tilde, an unverified
language, and no language at all). All 7 change-cases fail against the
previous implementation.
Full suites before and after: the same 17 failures, none of them touched by
this change.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>