How elnwsany/smart_ai_library works
Smart AI Library is a Flask web app offering four text and media processing services. Users open the site, choose a service, submit text, audio, or images, and receive generated speech, transcription, extracted text, or corrected text. The Flask routes dispatch requests to the corresponding model-backed modules; browser scripts submit requests and display results. The sampled sources show route and client wiring, but not the page templates’ contents or all model internals.
Main entry points: app.py Flask routes · main.js Site interactions · templates Web pages · stt_api.js STT interface
Components 12
Web application
- Web pages
templates - Flask routes
app.py - Site interactions
static/js/main.js
Speech services
- STT interface
static/js/stt_api.js - Audio transcription
api/STT_api.py - TTS interface
static/js/tts_api.js - Speech generation
api/text_to_speech.py
Image processing
- OCR interface
static/js/OCR_api.js - Image text extraction
api/ocr_api.py
Text processing
- GEC interface
static/js/GEC_api.js - Grammar correction
api/GEC_api.py
Other components
- User
Connections 12
- User → Web pages: opens
README.md - User → Site interactions: navigates
README.md - Flask routes → Web pages: renders pages
app.py - Site interactions → Flask routes: loads site
- STT interface → Flask routes: posts audio
static/js/stt_api.js - Flask routes → Audio transcription: transcribes audio
app.py - TTS interface → Flask routes: posts text
static/js/tts_api.js - Flask routes → Speech generation: generates speech
app.py - OCR interface → Flask routes: posts images
static/js/OCR_api.js - Flask routes → Image text extraction: extracts text
app.py - GEC interface → Flask routes: posts text
static/js/GEC_api.js - Flask routes → Grammar correction: corrects text
app.py