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.2-cp312-cp312-manylinux_2_28_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

revonorm-0.8.2-cp312-cp312-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

revonorm-0.8.2-cp311-cp311-win_amd64.whl (1.2 MB view details)

Uploaded CPython 3.11Windows x86-64

revonorm-0.8.2-cp311-cp311-manylinux_2_28_x86_64.whl (1.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

revonorm-0.8.2-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.2-cp310-cp310-manylinux_2_28_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

revonorm-0.8.2-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.2-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.2-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 88fde4f53db562b2da9c240ff36b06092db4e73f543beae25c1b904d7f1c341d
MD5 f3e08acf8c72037436fe76766535b46c
BLAKE2b-256 e714ba05104dcfd3967ebd17967add5c88e8f5efe64969078ee0a9152320e594

See more details on using hashes here.

File details

Details for the file revonorm-0.8.2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ee393a860303a31817e351a5df792e933796cb06fb14a2439def0c6100470dd6
MD5 2d5de059ab27ee9963fd09fd13afd921
BLAKE2b-256 11202e0da43b19476628272fbfc52711210dc0b2ab5a7557d753dcdac76555ae

See more details on using hashes here.

File details

Details for the file revonorm-0.8.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e32ddf6e879ddb82898b5a702e0eeac200cf50cea24784a355dfad8d99e5b3e3
MD5 6413819f0690e012296b846192ccb8de
BLAKE2b-256 e01ebc35b4770c7b27e347a3102e0d655e2150cd28f00c5c3d78682c3dde0e4f

See more details on using hashes here.

File details

Details for the file revonorm-0.8.2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for revonorm-0.8.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3bf58044d2f334bf0b4b9cdd6720f5f8ac218e532e6f34986848c2de454d8aea
MD5 f9d40850b961c9785ce6c1d7a7aae6e7
BLAKE2b-256 3c0e42c6dad245a35526caf10c6ed3246bdb629ac9e8616b80aedee453a8f560

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for revonorm-0.8.2-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6af3a6ce7c13d7d0432a2d9edd815824dcc008f8d47b92b93cd6dc3437892f09
MD5 ae59bb2d7ebb2e635b0f4885cb6646b7
BLAKE2b-256 523d508308e222365e61a257dbf1fb8660c5e4fc7c4d5ac98f91d1c72575f52f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for revonorm-0.8.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 618ad23540dd900a6243debd5e3545b93f87c198a12cae68a9f6a933821b9e77
MD5 196aee6236ad5cac351812b2c7d67bcb
BLAKE2b-256 d090d4261e3a3d22dc853690acf91139632aceb334410d6556303c11404bf79b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for revonorm-0.8.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 f1fd12ff12651c9ea3875a3e0d27599e86a896a9a9602d439d0fe3c821ffa843
MD5 aebb30853d6dc338bcd0caa64822a24d
BLAKE2b-256 ae9fc33aed25cc3d87161f44aff29abe9ce058ad5819b7afe463a4170a0a09bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for revonorm-0.8.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a7317a3c2530d73413b22cd8cd7105ff981ba74771e518f5af92bc1add44d8d2
MD5 9980ecc49a3a31b6398e385c7a97ba98
BLAKE2b-256 82c7e34f3edd9c40a1003156c526ff90e992c4baac03e8d9d264231b39a8d93c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for revonorm-0.8.2-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3fc8c53af181864b59e79cfd990e3969e5ced734ab98b418321a72ce9b91ffaa
MD5 68f0afe83df214fd9a4fcd8ab2f3ca0c
BLAKE2b-256 78c61fc00d79e8121536d22a7176b6c173753d8ceb00a101cc2caf593bb97de2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for revonorm-0.8.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 50e204aabbf47c954571b9c057ce9c6ad0565c9ccdfd6bcdcf6d09aa4b8931ad
MD5 7d6bf2f552f1298633e376b79a6cea64
BLAKE2b-256 cc4d8b2c87b1638b9529c691ba14c725b04eee0e9b6c1b0be04713502df931c5

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.0

21 files

0.9.0

21 files

0.8.5

6 files

0.8.4

21 files

0.8.3

21 files

This release

0.8.2 This release

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