{"id":21410,"library":"gruut","title":"gruut","description":"A tokenizer, text cleaner, and phonemizer for many human languages. Current version: 2.4.0. Release cadence: irregular, with major version bumps introducing API and CLI changes.","status":"active","version":"2.4.0","language":"python","source_language":"en","source_url":"https://github.com/rhasspy/gruut","tags":["tokenizer","phonemizer","text-cleaning","nlp","multilingual"],"install":[{"cmd":"pip install gruut","lang":"bash","label":"Install core library"},{"cmd":"pip install gruut[langs]","lang":"bash","label":"Install all language data"}],"dependencies":[{"reason":"English language data is now a separate package (since v2.1.0).","package":"gruut-lang-en","optional":true}],"imports":[{"note":"Top-level import; use gruut.sentences() for processing.","wrong":null,"symbol":"gruut","correct":"import gruut"},{"note":"The phonemizer function is in the top-level gruut module.","wrong":"from gruut.phonemizer import Phonemizer","symbol":"Phonemizer","correct":"from gruut import phonemizer"}],"quickstart":{"code":"import gruut\n\ntext = \"Hello world.\"\n# Use a language code (e.g., 'en-us')\nfor sentence in gruut.sentences(text, lang='en-us'):\n    for word in sentence:\n        if word.phonemes:\n            print(f\"{word.text}: {' '.join(word.phonemes)}\")","lang":"python","description":"Tokenize and phonemize a sentence with gruut."},"warnings":[{"fix":"Migrate to SSML tags like <say-as interpret-as='date'> for date/time expansion.","message":"API change in v2.0.0: The old inline pronunciation and <number>_<format> syntax were removed. Use SSML instead.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Run 'gruut sentences' instead of 'gruut'.","message":"CLI change in v2.0.0: Use 'gruut.sentences' subcommand instead of 'gruut' directly.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Run 'pip install gruut-lang-en' or install gruut with the langs extra: 'pip install gruut[langs]'.","message":"English language data moved to a separate package in v2.1.0. Must install gruut-lang-en explicitly.","severity":"breaking","affected_versions":">=2.1.0"},{"fix":"Use Python 3.7 or newer.","message":"Python 3.6 support is no longer guaranteed; latest releases require Python >=3.6 but newer dependencies may drop it.","severity":"deprecated","affected_versions":">=2.4.0"},{"fix":"Install gruut-lang-<lang> for your language (e.g., gruut-lang-en).","message":"The 'gruut' package does not include any language data by default. You must install language-specific packages.","severity":"gotcha","affected_versions":">=2.1.0"},{"fix":"Use --stdin-format lines for line-by-line input.","message":"When using stdin with --ssml in CLI v2.1.0+, input is assumed to be one SSML document per line unless --stdin-format lines is set.","severity":"gotcha","affected_versions":">=2.1.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install the corresponding gruut-lang-<lang> package, e.g., pip install gruut-lang-en.","cause":"Missing language data package for the requested language.","error":"ModuleNotFoundError: No module named 'gruut.lang'"},{"fix":"Use gruut.sentences() instead. See quickstart.","cause":"Using old API from gruut v1.x.","error":"AttributeError: module 'gruut' has no attribute 'text_to_phonemes'"},{"fix":"Install the language data package for 'en' (e.g., gruut-lang-en).","cause":"Language code not recognized because data not installed.","error":"ValueError: Unknown language: en"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}