How skkrishn1/multilingual-translator-speech-synthesizer works
This is a Streamlit application that accepts pasted text or uploaded documents, translates the content, and optionally generates downloadable speech. The main flow is user input → extraction when needed → translation → optional audio. The README documents caching and session-state results; sampled excerpts show the UI dispatching work to the processing modules. Some wiring is supported by the SOURCE INDEX or README rather than complete source excerpts, so the graph omits unverified details.
Main entry points: app.py Streamlit app · translator.py Chunked translation · tts.py Speech synthesis · extractors.py Document extraction
Components 10
User interface
- Streamlit app
app.py - Result state
app.py
Input and language
- Document extraction
src/extractors.py - Language registry
src/languages.py
Translation
- Runtime configuration
src/config.py - Chunked translation
src/translator.py
Speech
- Speech synthesis
src/tts.py
Other components
- User
- Gemini API
- Google speech service
Connections 14
- User → Streamlit app: enters text
README.md - Streamlit app → Document extraction: extracts upload
app.py - Document extraction → Streamlit app: returns text
src/extractors.py - Streamlit app → Language registry: looks up language
app.py - Streamlit app → Chunked translation: requests translation
app.py - Chunked translation → Gemini API: sends chunks
src/translator.py - Gemini API → Chunked translation: returns translation
src/translator.py - Chunked translation → Runtime configuration: reads limits and models
src/translator.py - Chunked translation → Streamlit app: returns result
app.py - Streamlit app → Result state: stores results
README.md - Streamlit app → Speech synthesis: requests audio
app.py - Speech synthesis → Runtime configuration: reads chunk limit
src/tts.py - Speech synthesis → Google speech service: synthesizes speech
src/tts.py - Speech synthesis → Streamlit app: returns MP3
app.py