Registry / ai-ml / gruut-lang-en

gruut-lang-en

JSON →
library2.0.1pypypiunverified

English language data files for the gruut tokenizer/phonemizer. This package provides English-specific lexicons, pronunciations, and grammar rules. It is a companion to the core gruut library. As of version 2.0.1, it contains data extracted from the main gruut package to allow independent updates. The library follows the release cadence of gruut and is maintained under the Rhasspy project.

pip install gruut-lang-en
INSTALL
IMPORT
SIG · GRUUT-LANG-EN
G
gruut-lang-en
ai-mlpythonv2.0.1
Install
5.0s avg
Import
Disk
55MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 57MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.0s · import 0.000s · 57MB
55MB installed
● package 55MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

sentences
from gruut_lang_en import sentences
from gruut import sentences

Tokenize and phonemize English text. Ensure gruut-lang-en is installed for English support. The 'lang' parameter must match an installed language package.

import os from gruut import sentences text = "Hello, world!" for sentence in sentences(text, lang="en-us"): for word in sentence: print(word.text, word.phonemes)
Debug
Known issues
breakingIn gruut v2.0.0, the API changed significantly: the 'gruut.sentences' function replaces the old 'gruut.tokenize' and 'gruut.phonemize' commands. With --ssml, stdin input is treated as a single SSML document by default; use --stdin-format lines to restore per-line behavior.
fix
Update code to use 'from gruut import sentences' and call 'sentences(text, lang="en-us")'. For SSML, pass lang=None or adjust stdin format.
affects: <2.0.0
gotchaThe English data package is separate: installing gruut alone does not include any language data. You must also install at least one language package (e.g., gruut-lang-en) to process text.
fix
Always run 'pip install gruut[en]' or 'pip install gruut-lang-en' alongside gruut.
affects: >=2.0.0
deprecatedInline pronunciations and <number>_<format> tokens were removed in gruut v2.0.0. Use SSML <say-as> or <sub> tags instead.
fix
Replace inline pronunciations with SSML elements.
affects: <2.0.0
Upgrade
Version history
2.0.1latest on PyPI · released Jul 3, 2024
Audit
Dependencies
gruutrequiredCore library required to use the language data
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
2
Resources
gruut-lang-en — pip install gruut-lang-en · libregistry