{"id":21408,"library":"gruut-lang-es","title":"Gruut Spanish Language Data","description":"Spanish language data files for the gruut tokenizer and phonemizer. This package provides Spanish-specific lexicons, phoneme mappings, and grammar rules necessary for tokenizing and phonemizing Spanish text. Version 2.0.1 is the latest stable release.","status":"active","version":"2.0.1","language":"python","source_language":"en","source_url":"https://github.com/rhasspy/gruut","tags":["gruut","spanish","nlp","phonemizer","tokenizer","tts"],"install":[{"cmd":"pip install gruut-lang-es","lang":"bash","label":"Default install"}],"dependencies":[{"reason":"Core library; lang data packages require gruut to be installed","package":"gruut","optional":false}],"imports":[{"note":"Gruut class from core package; lang data is auto-loaded based on language code","symbol":"Gruut","correct":"from gruut import Gruut"}],"quickstart":{"code":"from gruut import Gruut\n\ntext = \"Hola, ¿cómo estás?\"\ngruut = Gruut(lang=\"es\")\nsentences = list(gruut.tokenize(text))\nfor sentence in sentences:\n    for word in sentence:\n        print(f\"{word.text} -> {word.phonemes}\")","lang":"python","description":"Tokenize and phonemize Spanish text using gruut with the Spanish language pack. Ensures correct loading of Spanish data."},"warnings":[{"fix":"Update to use 'gruut.sentences' API and SSML for custom pronunciations.","message":"Version 2.0.0 introduced major API changes; the old sentence pattern and inline pronunciation system were removed.","severity":"breaking","affected_versions":">=2.0.0,<3.0.0"},{"fix":"Import Gruut from gruut core instead of attempting to import lang data directly.","message":"The 'gruut_lang_es' module is not intended for direct import; always use 'gruut.Gruut' with lang='es'.","severity":"deprecated","affected_versions":"all"},{"fix":"Run 'pip install gruut-lang-es' after installing gruut.","message":"The Spanish lang data package must be installed separately from gruut core. Many users forget to install it.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'from gruut import Gruut' and specify lang='es'; the data is auto-loaded.","cause":"Attempting to import the lang data package directly, which is not intended.","error":"ModuleNotFoundError: No module named 'gruut_lang_es'"},{"fix":"Install the package: pip install gruut-lang-es","cause":"The gruut-lang-es package is not installed or not discovered.","error":"gruut.data.DataError: No data for language 'es'"},{"fix":"Iterate over the sentence object directly or use 'for word in sentence'.","cause":"Old API used 'sentence.words', but in v2.0+ sentences are iterable of Word objects directly.","error":"AttributeError: 'Sentence' object has no attribute 'words'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}