gruut
A tokenizer, text cleaner, and phonemizer for many human languages.
What it is and what it does
Gruut is a multilingual text processing pipeline that breaks text into sentences and words, assigns part-of-speech tags, and generates IPA phoneme sequences for each word. It handles context-dependent pronunciation (e.g., 'read' as past vs. present tense) and supports SSML markup for mixed-language input. The package also automatically expands abbreviations, numbers, dates, currency, and times into spoken forms, respecting locale conventions—so "1/1/2020" is parsed as month-first or day-first depending on the text's declared language.
Gruut is primarily designed for speech synthesis pipelines and voice applications that need clean, phonetically annotated text. It bundles language-specific models for part-of-speech tagging and grapheme-to-phoneme conversion, and relies on external libraries like Babel, num2words, and python-crfsuite for linguistic analysis. The project is archived and no longer actively maintained, though it remains functional for its supported languages.
Use it for:
- Preprocessing text for text-to-speech systems that require phoneme-level control and multilingual support.
- Extracting structured phonetic data from raw text for linguistic research or speech recognition training.
- Normalizing and cleaning user input in voice assistant pipelines before synthesis.
- Converting mixed-language SSML documents into phonetically annotated word sequences.
- Expanding numeric and temporal expressions into natural language for audio output.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Gruut tokenizes, cleans, and converts text to IPA phonemes for multiple languages, with support for SSML markup and automatic expansion of numbers, dates, and currency.
Yes, if you need multilingual IPA phonemization and text normalization for a speech pipeline and can tolerate an archived codebase. The high install friction (12 dependencies) and abandoned maintenance status mean it is best suited for stable, non-evolving use cases. Not recommended for new projects requiring active support or ongoing language additions.
Install
gruut on PyPI
pip
pip install gruutuv
uv add gruutpoetry
poetry add gruutInstalling gruut
Before you install
High install friction due to 12 runtime dependencies including numpy, python-crfsuite, and language-specific packages. The project is archived and abandoned as of the latest commit; no active maintenance.
License in practice
MIT license permits commercial and private use with minimal restrictions, typical for permissive open-source projects.
Quickstart
pip install gruut
from gruut import sentences
text = 'He wound it around the wound.'
for sent in sentences(text, lang="en-us"):
for word in sent:
if word.phonemes:
print(word.text, *word.phonemes)
Requires Python 3.6 or higher; language support beyond English requires additional language packages or manual language file installation in $XDG_CONFIG_HOME/gruut/.
Verify before relying
- Whether the archived repository will receive security updates or bug fixes if issues arise.
- Performance characteristics with large text volumes or real-time processing demands.
- Compatibility with Python versions beyond 3.9 (classifiers list stops at 3.9).
- How many languages are currently supported and whether that list is maintained.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | high — source build required |
| Runtime dependencies | 12 — Babel, dateparser, gruut-ipa, gruut_lang_en, jsonlines, networkx, num2words, numpy, python-crfsuite, dataclasses, types-dataclasses, importlib_resources |
| Maintenance | abandoned — 772 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 101,860/month — #12,909 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: gruut-2.4.0.tar.gz
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
gruut-lang-enProvides English language data files for…
permissive · top 15,000 on PyPI
gruut-ipaGruut IPA parses, analyzes, and converts…
permissive · top 15,000 on PyPI
phonemizer-forkConverts text to phonetic representations…
copyleft · top 5,000 on PyPI
phonemizerPhonemizer converts written text into phonetic…
copyleft · top 15,000 on PyPI
misakiConverts written text to phonetic…
permissive · top 15,000 on PyPI
sea-g2pConverts text to phonemes for Vietnamese, Thai,…
permissive · top 15,000 on PyPI
tokenizerTokenizes Icelandic text into words,…
permissive · top 15,000 on PyPI
g2p-enConverts English text to phoneme sequences…
permissive · top 5,000 on PyPI
orthography2ipaConverts spelling to IPA phonetic transcription…
permissive · top 15,000 on PyPI
unicode-segmentation-rsProvides Unicode text segmentation (graphemes,…
unclear · top 15,000 on PyPI