Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SpeakSum πŸ“±πŸ“„πŸ”Š

An Android application that extracts text from PDF files, generates intelligent summaries, and reads them aloud using Text-to-Speech technology.

✨ Features

  • PDF Text Extraction: Extracts text content from PDF documents using PDFBox
  • Text-to-Speech (TTS): Reads summaries aloud with play/pause controls
  • Modern UI: Built with Jetpack Compose and Material Design 3
  • Real-time Processing: Displays loading indicators during PDF processing
  • Error Handling: User-friendly error messages for various failure scenarios

πŸ› οΈ Technology Stack

  • Language: Kotlin
  • UI Framework: Jetpack Compose
  • Architecture: MVVM (Model-View-ViewModel)
  • Concurrency: Kotlin Coroutines
  • PDF Processing: PDFBox for Android
  • Text-to-Speech: Android TTS API
  • Material Design: Material 3 Components

πŸ›οΈ Architecture Overview

πŸ“¦ Components

  1. MainActivity: Entry point that sets up the Compose UI theme
  2. MainScreen: Main composable containing the UI layout and interactions
  3. SViewModel: ViewModel managing app state and business logic

πŸ”‘ Key Features Implementation

πŸ“„ PDF Processing

  • Uses PDFBox library to load and extract text from PDF files
  • Runs on IO dispatcher to prevent blocking the main thread
  • Handles file URI selection through Android's document picker

πŸ“ Summary Generation

The app uses a keyword-based extraction algorithm:

  • Splits text into sentences
  • Prioritizes sentences containing keywords: "important", "conclusion", "result", "found", "shows", "indicates", "summary", "key"
  • Falls back to longest sentences if no keyword matches
  • Limits summary to 3-5 sentences and 1000 characters

πŸ”Š Text-to-Speech

  • Initializes TTS engine with US English locale
  • Tracks speaking state with real-time updates
  • Provides play and stop controls
  • Handles TTS lifecycle properly

πŸ“Š App States

The ViewModel manages several states:

  • isProcessing: Shows loading indicator during PDF processing
  • errorMessage: Displays error messages to users
  • summary: Stores the generated summary text
  • isSpeaking: Indicates if TTS is currently active
  • ttsReady: Confirms TTS engine initialization status

πŸ”§ Setup Steps

  1. πŸ“₯ Clone the repository
    git clone https://github.com/yourusername/SpeakSum.git
    cd SpeakSum

🎯 How It Works

Workflow

πŸ“„ PDF Selection β†’ πŸ“– Text Extraction β†’ 🧠 Summary Generation β†’ πŸ“‹ Display β†’ πŸ”Š TTS Playback

🀝 Contributing

We welcome contributions from the community! πŸŽ‰

⭐ Show Your Support

If you find this project helpful, please consider:

  • Starring the repository
  • Forking and contributing
  • Sharing with others
  • Reporting bugs
  • Suggesting new features

About

A modern Android app for PDF text extraction πŸ“„, smart summarization ✨, and Text‑to‑Speech playback πŸ”Š β€” powered by Kotlin, Compose, and Coroutines.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages