A comprehensive dyslexia-friendly reading and learning application designed to make text content more accessible through AI-powered text simplification, OCR, and specialized intervention tools.
- Overview
- Features
- Architecture
- Technology Stack
- Installation
- Configuration
- Usage
- API Documentation
- Project Structure
- Development
- Machine Learning Model
- Contributing
- License
NeuroRead is an assistive technology application specifically designed for individuals with dyslexia. It combines multiple features to enhance reading comprehension and provide targeted learning interventions:
- Intelligent Text Simplification: Uses a fine-tuned BART model to convert complex text into dyslexia-friendly summaries
- OCR Capabilities: Extract text from images and documents using EasyOCR
- Reading Practice: Speech-to-text analysis with detailed performance metrics
- Phonics Lessons: Interactive flashcards for grapheme-phoneme correspondence
- Spelling Practice: Auditory spelling exercises with immediate feedback
- Typing Practice: Speed and accuracy improvement exercises
- Progress Tracking: Comprehensive statistics and historical performance data
- Customizable Reading Interface: Adjustable font, spacing, themes, and text-to-speech
- AI-powered text simplification using fine-tuned BART-Large-CNN model
- Converts complex sentences into shorter, more comprehensible text
- Real-time processing through backend API
- Maintains meaning while reducing cognitive load
- Font Options: Standard fonts or OpenDyslexic font
- Customizable Spacing: Adjustable line spacing and paragraph spacing
- Font Size Control: Variable text size (12-32px)
- Theme Support: Light and dark mode
- Text-to-Speech: Built-in audio narration with word-level highlighting
- Chunked Reading: Text split into manageable sentence segments
- Short Line Width: Optional narrow column layout for easier tracking
- Extract text from images via camera or photo library
- Support for PDF and plain text document imports
- Powered by EasyOCR with English language support
- Direct integration with simplification pipeline
- Record audio of reading target text
- Transcription using Groq Whisper API (whisper-large-v3 model)
- Detailed analysis including:
- Word-level accuracy (correct, skipped, substituted, repeated)
- Speech rate (words per minute)
- Pause detection and duration
- Duration ratio per word
- Visual feedback with color-coded results
- Session history and performance tracking
- Interactive flashcard system
- Grapheme-phoneme correspondence training
- Audio pronunciation using text-to-speech
- Covers common graphemes: or, y, ph, ch, sh, th
- Mark lessons as learned for progress tracking
- Auditory spelling quiz
- Commonly misspelled words database
- Immediate feedback on correctness
- Score tracking and session history
- Words included: believe, receive, necessary, separate, definitely, calendar, embarrass
- Timed typing exercises
- Real-time WPM (words per minute) calculation
- Accuracy measurement
- Historical performance tracking
- Comprehensive dashboard showing:
- Total sessions completed
- Average spelling score
- Average typing speed
- Practice reading WPM
- Session history with timestamps
- Activity breakdown by intervention type
- Refresh to reload latest data
NeuroRead follows a client-server architecture:
┌─────────────────────────────────────┐
│ React Native Mobile App │
│ (Expo Router + TypeScript) │
│ │
│ - Reader Interface │
│ - Intervention Modules │
│ - Progress Dashboard │
│ - OCR Camera Integration │
└──────────────┬──────────────────────┘
│
│ HTTP/REST API
│
┌──────────────▼──────────────────────┐
│ FastAPI Backend Server │
│ (Python 3.8+) │
│ │
│ - Text Simplification (BART) │
│ - OCR Processing (EasyOCR) │
│ - Practice Audio Analysis (Groq) │
│ - Session Data Management │
└─────────────────────────────────────┘
- Text Simplification: Frontend sends text → Backend processes with fine-tuned BART model → Returns simplified text
- OCR: Frontend captures image → Backend extracts text with EasyOCR → Returns plain text
- Practice Analysis: Frontend records audio → Backend transcribes with Groq → Analyzes speech patterns → Returns detailed metrics
- Framework: React Native 0.81.5 with Expo SDK 54
- Navigation: Expo Router 6.0
- Language: TypeScript 5.9
- UI Components: Custom themed components
- Audio: expo-av for recording, expo-speech for TTS
- Camera: expo-camera for OCR scanning
- Storage: AsyncStorage for local data persistence
- Fonts: OpenDyslexic font integration
- Framework: FastAPI 0.104.1
- Server: Uvicorn 0.24.0 with hot reload
- ML Framework: PyTorch 2.1.0
- NLP: Transformers 4.35.0 (Hugging Face)
- OCR: EasyOCR 1.7.0
- Audio Processing: Groq API (Whisper Large V3)
- Computer Vision: OpenCV 4.8.1, Pillow 10.1.0
- Data: NumPy, Pandas, SciPy
- Model: Fine-tuned BART-Large-CNN
- Base Model: facebook/bart-large-cnn
- Fine-tuned Model: elvisbakunzi/dyslexia-friendly-text-simplifier
- Training: 8 epochs, batch size 2
- Metrics: ROUGE score evaluation
- Framework: Hugging Face Transformers with PyTorch
System Requirements:
- Python 3.8 or higher
- Node.js 16+ and npm/yarn
- Git
- Android Studio (for Android) or Xcode (for iOS)
- CUDA-capable GPU (optional, for faster inference)
API Keys Required:
- Groq API Key (for speech transcription)
-
Clone the repository:
git clone https://github.com/yourusername/NeuroRead.git cd NeuroRead -
Create and activate virtual environment:
python -m venv venv # Linux/Mac source venv/bin/activate # Windows venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure environment variables: Create a
.envfile in the root directory:GROQ_API_KEY=your_groq_api_key_here
-
Start the backend server:
cd backend uvicorn main:app --reload --host 0.0.0.0 --port 8000The backend will be available at
http://localhost:8000
-
Navigate to frontend directory:
cd frontend -
Install dependencies:
npm install # or yarn install -
Configure API endpoint: Edit
frontend/services/api.jsand update theAPI_URL:// For development on local network const API_URL = 'http://YOUR_LOCAL_IP:8000'; // For emulator/simulator // Android Emulator: http://10.0.2.2:8000 // iOS Simulator: http://localhost:8000
-
Start the development server:
npm start # or expo start -
Run on device/emulator:
# Android npm run android # iOS (Mac only) npm run ios # Web (experimental) npm run web
Model Configuration (backend/main.py):
MODEL_NAME = "elvisbakunzi/dyslexia-friendly-text-simplifier"EasyOCR Settings:
- Language: English
- GPU: Auto-detected (CUDA if available)
Groq API Settings:
- Model: whisper-large-v3
- Response Format: verbose_json
- Temperature: 0.0
- Language: en
Theme Customization (frontend/components/ThemeContext.js):
- Light/Dark mode themes
- Font family selection (Standard/OpenDyslexic)
- Font size range: 12-32px
- Line spacing: 1.0-3.0
- Paragraph spacing: 0-40px
Storage Keys:
currentText: Active text for readersessionHistory: Practice/intervention session data- Theme preferences stored in context
-
Start Backend Server:
cd backend uvicorn main:app --reload -
Start Mobile App:
cd frontend expo start -
Scan QR code with Expo Go app (iOS/Android) or run on emulator
- Navigate to Home tab
- Import text via:
- Manual paste/typing
- Pick PDF/Text/Image file
- Scan with camera (OCR)
- Tap "Start Reading"
- Use reader controls:
- Swipe left/right for navigation
- Tap play button for text-to-speech
- Toggle "Simplified" for AI-processed text
- Adjust settings via gear icon
- Go to Intervention tab
- Select "Reading Practice"
- Read displayed target text aloud
- Tap microphone to start recording
- Speak the text clearly
- Tap stop when finished
- View detailed analysis:
- Color-coded words (green=correct, red=skipped, orange=repeated)
- Speech rate and pause metrics
- Session statistics
- Go to Intervention → "Phonics Lessons"
- View grapheme on flashcard
- Tap card to flip and see phoneme
- Tap speaker icon to hear pronunciation
- Tap checkmark to mark as learned
- Use "Next Card" to progress
- Go to Intervention → "Spelling Practice"
- Tap "Hear Word Again" to hear word
- Type the word in input field
- Tap "Check" or press enter
- Review feedback
- Continue to next word or skip
- View final score at completion
- Navigate to Progress tab
- View summary statistics:
- Total sessions
- Spelling average
- Practice WPM
- Scroll down to see session history
- Pull down to refresh data
http://localhost:8000
GET /Response:
{
"message": "NeuroRead API"
}POST /simplify
Content-Type: application/jsonRequest Body:
{
"text": "The photosynthesis process involves the absorption of sunlight by chlorophyll."
}Response:
{
"simplified": "Photosynthesis is when plants use sunlight to make food."
}Parameters:
text(string, required): Text to simplify (max 512 tokens)
POST /ocr
Content-Type: multipart/form-dataRequest:
image(file, required): Image file (JPEG, PNG, etc.)
Response:
{
"text": "Extracted text from image..."
}Error Response:
{
"text": "",
"error": "Error description"
}POST /analyze-practice
Content-Type: multipart/form-dataRequest:
file(file, required): Audio file (.wav, .m4a, etc.)expected_text(string, optional): Expected text (default provided)
Response:
{
"word_data": [
{
"word": "the",
"start": 0.0,
"end": 0.24,
"pause_ms": 0,
"duration_ratio": 0.6,
"speech_rate_wpm": 0,
"status": "correct",
"skipped": false,
"repetition": false
}
],
"stats": {
"skipped_words": 1,
"repetitions": 0,
"wpm": 125.5
}
}Error Response:
{
"error": "Groq API key not configured on backend."
}200 OK: Successful request400 Bad Request: Invalid input500 Internal Server Error: Server-side error
NeuroRead/
│
├── backend/ # FastAPI Backend
│ ├── main.py # Main API endpoints
│ ├── data/ # Persistent storage
│ │ └── session_results.json # Stored practice sessions (moved from root)
│ ├── requirements.txt # Python dependencies
│ ├── tests/
│ │ └── test_ocr.py # OCR unit tests
│ └── README.md # Backend documentation
│
├── frontend/ # React Native App (Expo)
│ ├── app/ # Expo Router pages
│ │ ├── (tabs)/ # Tab navigation (Home, Intervention, Progress)
│ │ ├── intervention/ # Intervention modules (Practice, Lessons, Masking)
│ │ ├── reader/ # Reader interface
│ │ └── _layout.tsx # Root layout
│ │
│ ├── components/ # Reusable UI components
│ ├── services/ # Business logic & API integration
│ ├── assets/ # Static resources (fonts, images)
│ └── ...
│
├── ml/ # Machine Learning & Research
│ ├── dyslexic_summarizer/ # Text simplification model
│ │ ├── finetune_BART.ipynb # Training notebook
│ │ └── data.json # Training data
│ │
│ └── practise_feature/ # Practice mode scripts & experiments
│ ├── practice_script.py # Standalone analysis script
│ └── ...
│
├── requirements.txt # Consolidated Python dependencies
├── .env # Environment variables (API keys)
├── .gitignore # Git ignore rules
└── README.md # This file (Project Documentation)
Backend Tests:
cd backend
pytest tests/Frontend Tests:
cd frontend
npm test-
Backend Development:
- Make changes in
backend/main.py - Server auto-reloads with
--reloadflag - Test endpoints with curl, Postman, or frontend
- Make changes in
-
Frontend Development:
- Edit files in
frontend/app/orfrontend/components/ - Expo provides hot reload
- Changes appear instantly on device/simulator
- Edit files in
-
Model Development:
- Use
notebooks/finetune_BART.ipynbfor model training - Upload trained model to Hugging Face
- Update
MODEL_NAMEinbackend/main.py
- Use
Python:
- Follow PEP 8
- Use type hints where applicable
- Document functions with docstrings
TypeScript/JavaScript:
- Use TypeScript for type safety
- Follow React/React Native best practices
- Use functional components with hooks
Backend Endpoint:
- Add route in
backend/main.py - Define request/response models with Pydantic
- Implement business logic
- Test endpoint
Frontend Screen:
- Create component in appropriate
app/directory - Add navigation route if needed
- Connect to backend via
services/api.js - Style with theme context
Base Model: facebook/bart-large-cnn
- Pre-trained on CNN/DailyMail dataset
- Designed for abstractive summarization
- 406M parameters
Fine-tuning:
- Dataset: Custom dyslexia-friendly text pairs
- Training Data: 752 examples (data.json + data_1.json)
- Epochs: 8
- Batch Size: 2
- Learning Rate: 5e-5
- Evaluation Metric: ROUGE scores
- Hardware: GPU recommended (Google Colab)
Model Repository:
- Hugging Face:
elvisbakunzi/dyslexia-friendly-text-simplifier - License: Same as BART base model
-
Data Preparation:
- Collected complex text samples
- Created dyslexia-friendly summaries
- Formatted as JSON pairs
-
Fine-tuning:
- Used Hugging Face Trainer API
- Applied generation parameters:
- max_length: 256
- num_beams: 3
- length_penalty: 0.8
- no_repeat_ngram_size: 2
-
Evaluation:
- Computed ROUGE-1, ROUGE-2, ROUGE-L scores
- Manual quality assessment
- Tested on held-out examples
outputs = model.generate(
**inputs,
max_length=256,
num_beams=3,
length_penalty=0.8,
early_stopping=True,
no_repeat_ngram_size=2,
)To retrain with new data:
-
Prepare data in JSON format:
[ { "input_text": "Complex sentence...", "summary": "Simple sentence..." } ] -
Open
notebooks/finetune_BART.ipynbin Jupyter/Colab -
Update file paths and configuration
-
Run all cells to train
-
Save and upload to Hugging Face
-
Update
MODEL_NAMEin backend
Create a .env file in the root directory:
# Groq API Configuration
GROQ_API_KEY=your_groq_api_key_here
# Optional: Database configuration (if using)
# DATABASE_URL=postgresql://user:password@localhost/neuroread
# Optional: Debug settings
# DEBUG=TrueImportant: Never commit .env file to version control.
Problem: Model loading fails
- Solution: Ensure sufficient RAM (4GB+ free), download may take time on first run
Problem: OCR not working
- Solution: Check EasyOCR installation, ensure GPU drivers if using CUDA
Problem: Groq API errors
- Solution: Verify API key in
.env, check rate limits
Problem: Cannot connect to backend
- Solution: Update
API_URLinfrontend/services/api.jswith correct IP address
Problem: Expo app crashes on launch
- Solution: Clear cache with
expo start -c, reinstall dependencies
Problem: Fonts not loading
- Solution: Ensure font files exist in
frontend/assets/fonts/
Problem: Audio recording fails
- Solution: Check device permissions for microphone access
"Network request failed"
- Backend not running or wrong IP address
- Check firewall settings
- Verify device and computer on same network
"GROQ_API_KEY not found"
- Missing or incorrect
.envfile - Restart backend after adding key
"Module not found"
- Missing dependencies
- Run
pip install -r requirements.txtornpm install
- Model Caching: Model loaded once at startup
- GPU Acceleration: Auto-detects CUDA for faster inference
- Async Processing: FastAPI handles concurrent requests
- Consider: Implement model quantization for faster CPU inference
- Lazy Loading: Components loaded on-demand
- Memoization: React.memo for expensive components
- Debouncing: User input debounced for API calls
- Offline Support: AsyncStorage for offline data access
- API Keys: Never commit keys to repository
- Input Validation: Backend validates all inputs
- File Upload: Size and type restrictions on uploads
- CORS: Configure appropriately for production
- HTTPS: Use SSL/TLS in production environment
- Data Privacy: Audio recordings and session data should be encrypted
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/your-feature - Commit changes:
git commit -am 'Add new feature' - Push to branch:
git push origin feature/your-feature - Submit a pull request
- Follow existing code style
- Add tests for new features
- Update documentation
- Ensure all tests pass
- Keep commits atomic and well-described
This project is licensed under the MIT License - see the LICENSE file for details.
- BART Model: Facebook AI Research
- Fine-tuned Model: elvisbakunzi/dyslexia-friendly-text-simplifier
- EasyOCR: JaidedAI
- Groq: Whisper API provider
- OpenDyslexic Font: Abelardo Gonzalez
- Expo: Expo team for React Native framework
- FastAPI: Sebastián Ramírez
For questions, issues, or suggestions:
- GitHub Issues: Create an issue
- Email: your.email@example.com
If you use NeuroRead in your research, please cite:
@software{neuroread2026,
title={NeuroRead: An AI-Powered Dyslexia-Friendly Reading Application},
author={Your Name},
year={2026},
url={https://github.com/yourusername/NeuroRead}
}Note: NeuroRead is an assistive tool and should not replace professional diagnosis or intervention by qualified specialists. Always consult with educational and medical professionals for comprehensive dyslexia support.