Whisper Normalization
A Python package for text normalization, specifically designed for use with Whisper models.
Note: This code is extracted from OpenAI's Whisper repository to allow for standalone usage of the text normalization modules without the heavy dependencies of the full Whisper package.
- Original Source: openai/whisper
- License: MIT
Installation
You can install this package directly from source:
pip install .
You can also be installed from PyPi:
pip install whisper-normalization
Usage
from whisper_normalization import EnglishTextNormalizer, BasicTextNormalizer
# English Normalization
normalizer = EnglishTextNormalizer()
text = "Mr. Smith bought $5.50 worth of apples in the 1990s."
normalized = normalizer(text)
print(normalized)
# Output: "mister smith bought five dollars and fifty cents worth of apples in the nineteen nineties"
# Basic Normalization
basic_normalizer = BasicTextNormalizer()
text = "Bonjour à tous!"
normalized = basic_normalizer(text)
print(normalized)
Features
- Basic text cleaning (symbol removal, diacritic handling)
- Advanced English normalization:
- Number to text conversion (integers, decimals, currencies, years)
- Contraction expansion
- Abbreviation expansion
- British to American spelling normalization
Metadata
Release files for whisper-normalization 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| whisper_normalization-1.0.0.tar.gz | 21.2 kB | Without provenance | Details for whisper_normalization-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| whisper_normalization-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for whisper_normalization-1.0.0-py3-none-any.whl |
Total release size: 41.3 kB
Release files / whisper_normalization-1.0.0.tar.gz
| Download URL | whisper_normalization-1.0.0.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f40718b485635feb87e15cbe1d736a748e3e1dc1a4855fda6743038ea9bc1364
|
|
BLAKE2b-256 checksum How to use checksums |
af5dd9083d7ec558e1136a12d835e597b3c6875f2277c018b4ff90dd48e1316e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Release files / whisper_normalization-1.0.0-py3-none-any.whl
| Download URL | whisper_normalization-1.0.0-py3-none-any.whl |
|---|---|
| Size | 20.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1fe0c47a84c00fc861787999d9bb3ad4f35295e58c24fa5b67ec974ee5d86d57
|
|
BLAKE2b-256 checksum How to use checksums |
a66a251a66beb4430650a9ca3291ad7597321b3fb910f3938333dac978be97fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Security for whisper-normalization 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.