Skip to main content

A python package for whisper normalizer

Project description

whisper_normalizer

Installation of package

pip install whisper_normalizer

or from github repository

pip install git+https://github.com/kurianbenoy/whisper_normalizer.git

Why should we normalize/standardize text?

  • In ASR systems it’s important to normalize the text to reduce error in metrics like WER, CER etc.
  • Text normalization/standardization is process of converting texts in different styles into a standardized form, which is a best-effort attempt to penalize only when a word error is caused by actually mistranscribing a word, and not by formatting or punctuation differences.(from Whisper paper)

Why use this python package?

This package is a python implementation of the text standardisation/normalization approach which is being used in OpenAI whisper text normalizer. If you want to use just text normalization alone, it’s better to use this instead reimplementing the same thing. OpenAI approach of text normalization is very helpful and is being used as normalization step when evaluating competitive models like AssemblyAI Conformer-1 model.

How to use

OpenAI open source approach of text normalization/standardization is mentioned in detail Appendix Section C pp.21 the paper Robust Speech Recognition via Large-Scale Weak Supervision.

You can use the same thing in this package as follows:

from whisper_normalizer.basic import BasicTextNormalizer

normalizer = BasicTextNormalizer()
normalizer("I'm a little teapot, short and stout. Tip me over and pour me out!")
'i m a little teapot short and stout tip me over and pour me out '
from whisper_normalizer.english import EnglishTextNormalizer

english_normalizer = EnglishTextNormalizer()
english_normalizer("I'm a little teapot, short and stout. Tip me over and pour me out!")
'i am a little teapot short and stout tip me over and pour me out'

Project details


Download files

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

Source Distribution

whisper_normalizer-0.0.2.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

whisper_normalizer-0.0.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file whisper_normalizer-0.0.2.tar.gz.

File metadata

  • Download URL: whisper_normalizer-0.0.2.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for whisper_normalizer-0.0.2.tar.gz
Algorithm Hash digest
SHA256 cddd1ca3f29922e6fe58d9bc46d04ce481c222c31d5115f12a5678388760d964
MD5 07c1c9c6d2967a36290b394d292ae2fc
BLAKE2b-256 18ad4672ffe103a348970dcdfb8ba5b500ef21ce5d0b0008180feb1e3e0a54b6

See more details on using hashes here.

File details

Details for the file whisper_normalizer-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for whisper_normalizer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 95064763f524a123ebe249311e4986646c578e64a7e9f2126c384c0f36d8d1b8
MD5 d0d4b9efcec69cee38213145bd546acb
BLAKE2b-256 2bf4b27e5e235cbce74af5260c8f9eba768f93057ac83f4fc1ef700a134337fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page