This Streamlit app transforms text from an image into a motivational speech with military-style intensity — and then speaks it out loud using text-to-speech synthesis.
- 📸 Upload Image: Accepts
.jpg,.jpeg, and.pngformats. - 🧠 OCR (Optical Character Recognition): Extracts text from the uploaded image using
easyocr. - ✍️ Summarization: Summarizes extracted text using an AI model via
ollama(LLaMA 3.2). - 🎙 Speech Conversion: Transforms the summary into a motivational military speech.
- 🔊 Text-to-Speech (TTS): Converts the speech into audio using Piper TTS.
- 🎧 Audio Playback: Streamlit interface plays the generated audio.
git clone https://github.com/HirthikBalaji/DELTA.git
cd DELTAMake sure you have Python 3.9+ and virtualenv:
pip install streamlit easyocr pillowInstall and configure:
ollama(for local LLM inference)piper(TTS engine)- -
Piper_model(Model Files)
Ensure llama3.2 model is pulled and available for chat-based summarization:
ollama pull llama3.2Make sure Piper is installed (via WSL or Linux), and you have a model like en_US-hfc_male-medium.onnx and en_US-hfc_male-medium.json in the ./piper/ directory:
# Inside WSL or Linux terminal
cd piper
./piper --list # To list available voices- Upload an image.
- The app extracts text using OCR (
easyocr). - It summarizes the text using the LLaMA 3.2 model via
ollama. - The summary is transformed into a powerful motivational speech.
- Piper TTS synthesizes the speech into an audio file.
- The audio is played directly in the Streamlit UI.
├── app.py # Main Streamlit application
├── piper/
│ ├── piper # Piper binary (Linux or WSL)
│ └── en_US-hfc_male-medium.onnx # TTS voice model
├── welcome.wav # Output audio file (auto-generated)
streamlit run app.py- The Piper TTS command uses WSL (
wsl ./piper/piper) — make sure you have WSL set up if on Windows. - Ensure
ollamais running as a background service before using the app. - Piper models can be downloaded from Piper TTS GitHub.
MIT License