Skip to main content

OLaPh — Optimal Language Phonemizer

PyPI version Python versions License: MIT

OLaPh (Optimal Language Phonemizer) is a multilingual phonemization framework that converts text into phonemes surpassing the quality of comparable frameworks.


NEWS

05/2026: The instruction finetuning dataset for OlaphLLM is available here

05/2026: A new version of OLaPhLLM is available here


Overview

Traditional phonemizers rely on simple rule-based mappings or lexicon lookups. Neural and hybrid approaches improve generalization but still struggle with:

  • Names and foreign words
  • Abbreviations and acronyms
  • Loanwords and compounds
  • Ambiguous homographs

OLaPh tackles these challenges by combining:

  • Extensive language-specific dictionaries
  • Abbreviation, number, and letter normalization
  • Compound resolution with probabilistic scoring
  • Cross-language handling
  • NLP-based preprocessing via spaCy and Lingua

Evaluations on the Wikipron dataset show improved accuracy and robustness over existing phonemizers, including on OOV words.


Features

  • Multilingual phonemization (DE, EN-US, EN-UK, FR, ES, NL, SV, DA, PL, IT, FI)
  • Abbreviation and letter pronunciation dictionaries
  • Number normalization
  • Cross-language acronym detection
  • Compound splitting with statistical scoring
  • Freely available lexica for research and development derived from wiktionary.org.

Large Language Model

A LLM based on OLaPh output is also available. It is a GemmaX 2B Model trained on ~10M sentences derived from the FineWeb Corpus phonemized with the OLaPh framework.

Find it here on huggingface (DE, EN, FR, US. Training for additional languages planned)


Installation

From PyPI

pip install olaph

spaCy models are downloaded on demand.

From source

git clone https://github.com/iisys-hof/olaph.git
cd olaph
pip install -e .

Example Usage

from olaph import Olaph

phonemizer = Olaph()

output = phonemizer.phonemize_text("He ordered a Brezel and a beer in a tavern near München.", lang="en-us")

print(output)

Dependencies


Dictionars Sources

Research Summary

Phonemization is a critical component in text-to-speech synthesis. Traditional approaches rely on deterministic transformations and lexica, while neural methods offer potential for higher generalization on out-of-vocabulary (OOV) terms. This work introduces OLaPh (Optimal Language Phonemizer), a hybrid framework that integrates extensive multilingual lexica with advanced NLP techniques and a statistical subword segmentation function. Evaluations on the WikiPron benchmark show that the OLaPh framework significantly outperforms established baselines in overall accuracy and maintains robustness on OOV data through advanced fallback mechanisms. To further explore neural generalization, we utilize the framework to synthesize a high-consistency training corpus for an instruction-tuned Large Language Model (LLM). While the deterministic framework remains more accurate overall, the LLM demonstrates strong generalization, matching or partly exceeding the framework’s performance. This suggests that the LLM successfully internalized phonetic intuitions from the synthetic data that transcend the framework’s capabilities. Together, these tools provide a comprehensive, open-source resource for multilingual G2P research.


Citation

If you use OLaPh in academic work, please cite:

@misc{wirth2026olaphoptimallanguagephonemizer,
      title={OLaPh: Optimal Language Phonemizer}, 
      author={Johannes Wirth},
      year={2026},
      eprint={2509.20086},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2509.20086}, 
}

Metadata

Release files for olaph 0.2.25

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

Source distribution (sdist)

Source distribution for olaph 0.2.25
File Size Uploaded Provenance Actions
olaph-0.2.25.tar.gz 42.5 MB Without provenance Details for olaph-0.2.25.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for olaph 0.2.25
File Interpreter ABI Platform Actions
olaph-0.2.25-py3-none-any.whl Python 3 none any Details for olaph-0.2.25-py3-none-any.whl

Total release size: 86.6 MB

Release files / olaph-0.2.25.tar.gz

Download URL olaph-0.2.25.tar.gz
Size 42.5 MB
Tags Source
SHA-256 checksum
How to use checksums
057be3692e8b7e7a52f25bc8c9fbe5b89df6d79a29a56ccedca8d044216e08f1
BLAKE2b-256 checksum
How to use checksums
a7b78d1ec61b964102ff505b12f71595c1d0cc9a95e767d20b8f16d4ff4ec9dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / olaph-0.2.25-py3-none-any.whl

Download URL olaph-0.2.25-py3-none-any.whl
Size 44.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c8ac8f9e56a529b1cbb4192d8d45365f869c2d8b532f518e080f6e3def5b4807
BLAKE2b-256 checksum
How to use checksums
fe8f00437ac1a69263f31bda89f3754fbdf7a646cf8d62749a5109660ba3c4e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for olaph 0.2.25

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.

Release history Release notifications | RSS feed

This release

0.2.25 This release

2 release files No provenance

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