How hari31416/indic-language-utils works
indic-language-utils is a provider-neutral Python toolkit for Indian-language text and speech capabilities, with an optional FastAPI interactive workbench. A typical workflow accepts text or audio, normalizes language information, selects a configured provider route, and returns translated, detected, transliterated, transcribed, or synthesized results. The README also documents script identification, document/code protection, localization catalogs, caching, and resilient fallback. Sampled clients confirm routing and caching for several capabilities; where source was not sampled, the graph shows documented subsystems without inferring their internal call chains.
Main entry points: routes.py REST endpoints · routing.py Provider routing · detection/client.py Language detection · transliteration/client.py Transliteration
Components 24
Interactive workbench
- Web application
web/src/App.tsx - Capability views
web/src/components - Web API client
web/src/api.ts - Audio streaming
web/src/streaming.ts - Key storage
web/src/storage.ts - HTTP application
src/indic_language_utils/server/app.py - REST endpoints
src/indic_language_utils/server/routes.py - WebSocket endpoints
src/indic_language_utils/server/streaming.py
Language capabilities
- Translation
src/indic_language_utils/providers - Language detection
src/indic_language_utils/detection/client.py - Transliteration
src/indic_language_utils/transliteration/client.py - Script identification
src/indic_language_utils/languages.py - Speech transcription
src/indic_language_utils/stt/client.py - Speech synthesis
src/indic_language_utils/tts/client.py - Text processing
src/indic_language_utils/processors.py
Provider execution
- Provider routing
src/indic_language_utils/routing.py - Provider registry
src/indic_language_utils/providers/factories.py - Provider adapters
src/indic_language_utils/providers
Shared foundations
- Configuration
src/indic_language_utils/config.py - Language registry
src/indic_language_utils/languages.py - Caching
src/indic_language_utils/cache.py
External engines
- Cloud and local engines
- Browser storage
Other components
- Workbench user
Connections 28
- Workbench user → Web application: uses
- Web application → Capability views: selects view
- Capability views → Web API client: requests
- Capability views → Audio streaming: streams audio
- Web application → Key storage: manages keys
- Key storage → Browser storage: reads and writes
- Web API client → REST endpoints: HTTP requests
- Audio streaming → WebSocket endpoints: WebSocket audio
- HTTP application → REST endpoints: mounts routes
- HTTP application → WebSocket endpoints: mounts routes
- REST endpoints → Language detection: runs detection
- REST endpoints → Speech transcription: runs transcription
- REST endpoints → Speech synthesis: runs synthesis
- Language detection → Provider routing: gets candidates
- Transliteration → Provider routing: gets candidates
- Speech transcription → Provider routing: gets candidates
- Speech synthesis → Provider routing: gets candidates
- Provider routing → Provider registry: resolves route
- Provider registry → Provider adapters: registers providers
- Provider adapters → Cloud and local engines: calls engines
- Language detection → Caching: reads and writes
- Transliteration → Caching: reads and writes
- Speech synthesis → Caching: reads and writes
- Language detection → Language registry: normalizes language
- Transliteration → Language registry: normalizes language
- Speech transcription → Language registry: normalizes language
- Translation → Cloud and local engines: uses engines
- Text processing → Translation: protects text