Skip to content

This is SmartNotes — an Android app built with Jetpack Compose. An offline AI app that summarises notes, retrieves related context, and speaks results aloud using TensorFlow Lite and Android’s native TTS engine.

Notifications You must be signed in to change notification settings

ayesha882/SmartNotesApp

Repository files navigation

🧠 SmartNotes – Offline AI-Powered Text Summarizer

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.


🚀 Features

🧩 Offline AI Intelligence

  • 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.

⚙️ Architecture

  • 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

🧠 AI Components Overview

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.

📱 Demo Workflow

  1. Launch the app on any Android 12+ device.
  2. Add multiple related notes (e.g., topics like “Neural Networks” and “Machine Learning”).
  3. Enter text and tap “Summarize (RAG-enriched)”.
  4. 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.


🧪 Testing Tips

  1. Test in Airplane Mode to confirm complete offline execution.
  2. Try the Demo Notes below for best results.
  3. Replace summarization.tflite (in app/src/main/assets/) with a real quantized summarization model to see improved results.

💾 Demo Notes for Testing

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.

About

This is SmartNotes — an Android app built with Jetpack Compose. An offline AI app that summarises notes, retrieves related context, and speaks results aloud using TensorFlow Lite and Android’s native TTS engine.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages