Skip to main content

FIDA Normalizer

A text normalization package for TTS (Text-to-Speech) preprocessing with multi-language support.

Features

  • Multi-language Support: Supports Italian, English, French, German, Spanish, Portuguese, Dutch, and Swedish
  • Text Normalization: Converts numbers, dates, times, emails, URLs, and special characters to spoken forms
  • Phonemization Support: Optional IPA phoneme generation using Espeak
  • TTS Integration: Designed to work with NeMo and other TTS systems
  • Currency & Units: Handles currency symbols and measurement units

Installation

pip install fida-normalizer

From Source

git clone <repository-url>
cd fida_tts
pip install -e .

For Development

pip install -e ".[dev]"

Usage

Basic Usage

from Normalizer import Normalizer

# Create a normalizer instance (Italian language by default)
normalizer = Normalizer(lang='it')

# Normalize text
result = normalizer.normalize("Il prezzo è 50,50 euro")
print(result)  # Output: il prezzo è cinquanta virgola cinquanta euro

With Different Languages

from Normalizer import Normalizer

# English normalizer
en_normalizer = Normalizer(lang='en')
result = en_normalizer.normalize("The price is $100.50")
print(result)  # Output: the price is dollar one hundred point fifty

With Phonemization

from Normalizer import Normalizer

# Enable phonemization (requires espeak/espeak-ng installed)
normalizer = Normalizer(lang='it', phonemize=True)
result = normalizer.normalize("Ciao mondo")
print(result)  # Output: IPA phonemes

Configuration Options

from Normalizer import Normalizer

normalizer = Normalizer(
    lang='it',           # Language code: 'it', 'en', 'fr', 'de', 'es', 'pt', 'nl', 'sv'
    tts_mode=True,       # TTS mode: keeps punctuation suitable for TTS
    to_lower=True,       # Convert output to lowercase
    phonemize=False      # Enable/disable phonemization
)

Supported Languages

Language Code
Italian it
English en
French fr
German de
Spanish es
Portuguese pt
Dutch nl
Swedish sv

Supported Transformations

  • Numbers: Converts digits to spoken words (e.g., "123" → "one hundred twenty-three")
  • Decimals: Handles decimal separators based on locale
  • Percentages: Converts "%" to spoken form
  • Currency: Handles $, €, £, ¥ symbols
  • Dates: Converts date formats to spoken form
  • Times: Converts time formats (HH:MM, HH:MM:SS)
  • Emails: Spells out email addresses
  • URLs/Domains: Spells out web addresses
  • Units: Converts measurement units (m, kg, km/h, etc.)
  • Special Characters: Handles @, &, -, _, /, etc.

Requirements

  • Python >= 3.8
  • phonemizer >= 3.0.0 (optional, for phonemization)
  • espeak or espeak-ng (system dependency for phonemization)

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Metadata

Release files for fida-normalizer 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fida-normalizer 0.1.1
File Size Uploaded
fida_normalizer-0.1.1.tar.gz 21.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fida-normalizer 0.1.1
File Interpreter ABI Platform
fida_normalizer-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 43.9 kB

Release files / fida_normalizer-0.1.1.tar.gz

Download URL fida_normalizer-0.1.1.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
40f5cda20db3e3bc44b965d9e985a9c6a9db1dda638d5a9851b0bf0379fff0de
BLAKE2b-256 checksum
How to use checksums
be83d34138b77754ecce3d1d3186a7575e6179ce2d4bdba79b430a0b2930b88d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / fida_normalizer-0.1.1-py3-none-any.whl

Download URL fida_normalizer-0.1.1-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0441e8e2d0ec3c47024132eee6d000ac6021bed23025582f978e57a924a2f54
BLAKE2b-256 checksum
How to use checksums
96598524c6a754e23cf8033755d5cf895ebc22d9bfb12cd461fd8f73b36bb5e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release 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