Skip to main content

revonorm

Text normalization for TTS — converts written text (numbers, currency, dates, times, symbols) into spoken words across 5 languages: ms, id, en, zh, zh_my.

pip install revonorm

Use

from revonorm import normalize_text

normalize_text('Harga RM10.50 sahaja', 'ms')   # "Harga sepuluh ringgit lima puluh sen sahaja"
normalize_text('It costs $5.50', 'en')         # "It costs five dollar fifty cents"
normalize_text('价格是RM50,温度25C', 'zh')     # "价格是五十令吉,温度二十五摄氏度"
normalize_text('Rp5rb dan 5jt', 'id')          # "lima ribu rupiah dan lima juta"

API

normalize_text(text, language, profile=None, disable=None)str

Language is required. Unknown codes raise ValueError.

Option What it does
profile "minimal", "basic", "standard", "aggressive"
disable Features to turn off, e.g. ["acronyms", "measurements"]

normalize(text, language, options_json="")str

The same pipeline with config as JSON — pronunciation overrides live here:

normalize('top up RevoPay RM30K', 'ms', '{"pronunciations": {"*": {"RevoPay": "revo pay"}}}')
# "top up revo pay tiga puluh ribu ringgit"

normalize('sambung WiFi', 'ms', '{"pronunciations": {"*": {"WiFi": null}}}')
# "sambung WiFi"  (null = leave as written)

Pronunciations: "*" applies to all languages; a language code scopes it; null deletes the term.

supported_languages()list[str]

supported_languages()   # ['en', 'id', 'ms', 'zh', 'zh_my']

Relationship to revo-norm

revonorm (this package) and revo-norm (pure Python) expose the same normalize_text(text, language=...) API and produce identical output. Consumers can switch between them without code changes.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

revonorm-0.8.5-cp311-cp311-manylinux_2_28_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

revonorm-0.8.5-cp311-cp311-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

revonorm-0.8.5-cp310-cp310-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.10Windows x86-64

revonorm-0.8.5-cp310-cp310-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

revonorm-0.8.5-cp310-cp310-manylinux_2_28_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

revonorm-0.8.5-cp310-cp310-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file revonorm-0.8.5-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.5-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 254f9f3fe5ddce49b290998cce8f9dda10a6d0898a166cc4acd1b31d23483d29
MD5 3bd35204d2c01a12f75dc5583631a307
BLAKE2b-256 0510ca824cd9c13902659a7cdafa2563420a941a529911f94cdddeb99ef37bf2

See more details on using hashes here.

File details

Details for the file revonorm-0.8.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b29b7a6dfe045f2b8509491f04eac22ce5f3ac701629bd567693722b7e1fa9bd
MD5 ca526ba91d8455eb46ed488b9b00245f
BLAKE2b-256 210ea4ccb97adef6d43e11a3315223c53decb90f7cad1453e90ea345f351c9bc

See more details on using hashes here.

File details

Details for the file revonorm-0.8.5-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 ae575fb9c3f728f5c404d912aba3656c70aca77c5471c83d1e2c8f5ab0ca609c
MD5 fa7145901f7c169e365af6538f43f562
BLAKE2b-256 f9b69fb4ef0e56268a3064bedf72a7c52f849b98b98b34a695e8d4c52215c764

See more details on using hashes here.

File details

Details for the file revonorm-0.8.5-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c82ccf5b94c6000358ec5c212424eb6ec0ac496a3da6729024210e8f5d162f29
MD5 719194bad7cc115ffd74ec5a30356d1e
BLAKE2b-256 bc6a8cb5692078bb1137ed37b21bfc207b31d933fc677f580a15990b4e1942b6

See more details on using hashes here.

File details

Details for the file revonorm-0.8.5-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.5-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1a6be58a21d2bade4d330c2a5659dbeb9a61b60f9791434e257f5a51ba49aae4
MD5 362a7d9629c9c1e4ac0486a7445d9c63
BLAKE2b-256 184388588be51b897f1407b6d4d88078366ff0f219a27a1f129b893c0d327710

See more details on using hashes here.

File details

Details for the file revonorm-0.8.5-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b95f6fb25076d334b539ef65ffa1378378bd638c68ec108f3457afe8f20f41ef
MD5 142642e41bdbec0a3557b9d84a572575
BLAKE2b-256 ea0865d43fc1a0d8fedf9f80c256d0f55dc06a850dcd71c5eb45ff447e2d0c98

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

21 files

0.9.0

21 files

This release

0.8.5 This release

6 files

0.8.4

21 files

0.8.3

21 files

0.8.2

10 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page