How rhasspy/gruut works
Gruut turns plain text or SSML into language-aware sentences and word records, including normalized/verbalized text, POS tags where available, and IPA pronunciations. Its central workflow is exposed through the Python API and CLI; language settings and installed language packs provide locale-specific resources. The README also documents number/date/currency/time expansion and an optional eSpeak pronunciation mode. Relationships between the main processing stages are documented at a high level, but the excerpts do not show the complete runtime call chain, so uncertain internal links are omitted.
Main entry points: text_processor.py Text Processor · lang.py Language Settings · __init__.py Python API · __main__.py Command Line
Components 14
User Interfaces
- Python API
gruut/__init__.py - Command Line
gruut/__main__.py
Text Processing
- Text Processor
gruut/text_processor.py - Text Data Types
gruut/const.py
Language and Pronunciation
- Language Settings
gruut/lang.py - Lexicon Lookup
gruut/phonemize.py - Grapheme-to-Phoneme
gruut/g2p.py - POS Tagger
gruut/pos.py - eSpeak Mode
bin/espeak_word.py
Language Resources
- Resource Discovery
gruut/utils.py - Language Packs
gruut-lang-en/gruut_lang_en/__init__.py
Other components
- Text or SSML
- Sentence and Word Records
- eSpeak NG
Connections 15
- Text or SSML → Python API: submits text
- Text or SSML → Command Line: submits text
- Python API → Text Processor: processes text
- Command Line → Text Processor: processes text
- Text Processor → Sentence and Word Records: produces records
- Text Processor → Language Settings: uses language settings
gruut/text_processor.py - Text Processor → Lexicon Lookup: gets pronunciations
- Text Processor → POS Tagger: gets POS tags
- Language Settings → Resource Discovery: discovers resources
gruut/lang.py - Resource Discovery → Language Packs: searches installed packs
gruut/utils.py - Language Settings → Grapheme-to-Phoneme: loads G2P model
gruut/lang.py - Language Settings → POS Tagger: loads POS model
gruut/lang.py - Lexicon Lookup → Sentence and Word Records: supplies phonemes
- eSpeak Mode → eSpeak NG: calls phonemizer
bin/espeak_word.py - Text or SSML → eSpeak Mode: selects mode