NeMo text processing for ASR and TTS
Maintained. Last release 6 months ago, commits in 4 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install nemo-text-processingNeMo Text Processing
Introduction
nemo-text-processing is a Python package for text normalization and inverse text normalization.
Documentation
NeMo-text-processing (text normalization and inverse text normalization).
Tutorials
| Google Collab Notebook | Description |
|---|---|
| Text_(Inverse)_Normalization.ipynb | Quick-start guide |
| WFST_Tutorial | In-depth tutorial on grammar customization |
Getting help
If you have a question which is not answered in the Github discussions, encounter a bug or have a feature request, please create a Github issue. We also welcome you to directly open a pull request to fix a bug or add a feature.
Installation
Conda virtual environment
We recommend setting up a fresh Conda environment to install NeMo-text-processing.
conda create --name nemo_tn python==3.10
conda activate nemo_tn
(Optional) To use hybrid text normalization install PyTorch using their configurator.
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
NOTE: The command used to install PyTorch may depend on your system.
Pip
Use this installation mode if you want the latest released version.
pip install nemo_text_processing
NOTE: This should work on any Linux OS with x86_64. Pip installation on MacOS and Windows are not supported due to the dependency . On a platform other than Linux x86_64, installing from Pip tries to compile Pynini from scratch, and requires OpenFst headers and libraries to be in the expected place. So if it's working for you, it's because you happen to have installed OpenFst in the right way in the right place. So if you want to Pip install Pynini on MacOS, you have to have pre-compiled and pre-installed OpenFst. The Pynini README for that version should tell you which version it needs and what flags to use. Instead, we recommend you to use conda-forge to install Pynini on MacOS or Windows: .