{"id":21409,"library":"gruut-lang-fr","title":"gruut-lang-fr","description":"French language data files for the gruut tokenizer/phonemizer library. Provides grapheme-to-phoneme (g2p) models, lexicons, and language-specific rules for French text normalization and pronunciation. Current version: 2.0.2, released as part of gruut v2.0.0 refactoring. Gruut core releases frequently; language packages versioned independently.","status":"active","version":"2.0.2","language":"python","source_language":"en","source_url":"https://github.com/rhasspy/gruut","tags":["gruut","phonemizer","g2p","french","nlp","text-to-speech"],"install":[{"cmd":"pip install gruut-lang-fr","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core library required for tokenization and phonemization","package":"gruut","optional":false}],"imports":[{"note":"Language data is auto-loaded when setting lang='fr' on gruut classes; do not import the language package directly.","wrong":"from gruut_lang_fr import ...","symbol":"gruut","correct":"import gruut"}],"quickstart":{"code":"import gruut\n\n# Tokenize and phonemize French text\nsentences = gruut.sentences('Bonjour le monde', lang='fr')\nfor sentence in sentences:\n    for word in sentence:\n        if word.phonemes:\n            print(f\"{word.text} -> {''.join(word.phonemes)}\")","lang":"python","description":"Simple example using gruut with French language data."},"warnings":[{"fix":"Use gruut.sentences() instead of gruut.tokenize(). See quickstart example.","message":"Gruut v2.0.0 changed the API from gruut.tokenize to gruut.sentences. Old code using gruut.tokenize will break.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Install the specific language package: pip install gruut-lang-fr","message":"The language data packages (gruut-lang-*) are separate from the core gruut package. Simply installing gruut does not include language data.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Do not import gruut_lang_fr. Simply set lang='fr' in gruut functions.","message":"Language data is automatically loaded when using lang='fr'. Manually importing gruut_lang_fr is not supported and may cause issues.","severity":"gotcha","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install gruut-lang-fr","cause":"Language package not installed.","error":"ModuleNotFoundError: No module named 'gruut_lang_fr'"},{"fix":"Use gruut.sentences() instead. See gruut v2 migration guide.","cause":"Using gruut v2 API with v1 code.","error":"AttributeError: module 'gruut' has no attribute 'tokenize'"},{"fix":"Ensure gruut-lang-fr is installed and compatible with the installed gruut core version.","cause":"gruut-lang-fr not installed or version mismatch.","error":"RuntimeError: No language data for 'fr'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}