SmartNotes is an Android app built using Jetpack Compose and Kotlin, demonstrating advanced offline AI integration.
It summarizes text, retrieves related notes using local vector memory, and speaks summaries aloud via Text-to-Speech (TTS) — all running entirely on-device, without any internet connection.
- Text Summarization: Uses a TensorFlow Lite (TFLite) model or a fallback extractive summarizer.
- Vector Memory: In-memory semantic embeddings allow contextual retrieval of related notes.
- RAG-Style Pipeline: Combines retrieved context with the user’s text for enriched summarization.
- Text-to-Speech (TTS): Reads the summary aloud using Android’s built-in TTS engine.
- Kotlin + Jetpack Compose UI
- MVVM pattern for clean separation of concerns
- Room/Repository-ready structure for future persistence
- TFLite model integration with fallback logic for devices without model files
| Component | Purpose |
|---|---|
SummaryModel.kt |
Handles summarization logic and loads the TFLite model. Includes fallback extractive summarizer and embedding generator. |
VectorMemoryManager.kt |
Stores and retrieves vector embeddings for semantic search between notes. |
RAGPipeline.kt |
Retrieves similar notes using embeddings and merges them for context-enriched summarization. |
TTSManager.kt |
Uses Android’s TextToSpeech engine to read summaries aloud. |
MainViewModel.kt |
Coordinates AI logic — embeddings, summarization, and TTS — and manages app state. |
- Launch the app on any Android 12+ device.
- Add multiple related notes (e.g., topics like “Neural Networks” and “Machine Learning”).
- Enter text and tap “Summarize (RAG-enriched)”.
- The app:
- Generates embeddings for stored notes.
- Retrieves the most similar ones.
- Produces a concise summary enriched with relevant context.
- Reads the summary aloud via TTS.
🧩 Works fully offline — no API calls, no internet required.
- Test in Airplane Mode to confirm complete offline execution.
- Try the Demo Notes below for best results.
- Replace
summarization.tflite(inapp/src/main/assets/) with a real quantized summarization model to see improved results.
You can use these example notes to test RAG-style summarization:
| Title | Content |
|---|---|
| Machine Learning Basics | Machine learning is a subset of AI enabling systems to learn from data without explicit programming. |
| Neural Networks Overview | Neural networks are models that learn from data through layers of neurons inspired by the human brain. |
| On-Device AI | On-device AI runs models locally for privacy and low latency. |
| Model Quantization | Quantization reduces model size and improves speed with minimal accuracy loss, ideal for mobile AI. |
| Text Summarization Techniques | Text summarization can be extractive or abstractive. Modern NLP models like Pegasus perform abstractive summarization. |