Skip to content
porasnagarPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽค LumaVoice - AI-Powered Lip Reading Technology

Breaking the silence with artificial intelligence

LumaVoice transforms lip movements into spoken words, empowering communication for the deaf and mute community through cutting-edge computer vision and machine learning.

LumaVoice Demo

โœจ What Makes LumaVoice Special

Real-Time Processing: Upload videos or record live webcam footage for instant lip reading analysis

Advanced ML Pipeline: Built with TensorFlow and comprehensive video preprocessing including face detection, landmark extraction, and mouth region cropping

Modern Web Stack: React 18 + TypeScript frontend with a powerful FastAPI backend

Beautiful UI: Glass morphism design with dark/light theme support and responsive mobile interface

Production Ready: Containerized with Docker, CORS configured, and deployment-ready architecture

Features

๐ŸŽฅ Video Input Methods

  • File Upload: Support for MP4, AVI, MOV, MKV, and WebM formats
  • Webcam Recording: Real-time video capture with MediaRecorder API
  • Test Videos: Pre-loaded sample videos for quick testing

๐Ÿง  AI-Powered Analysis

  • Face Detection: Automatic face alignment and tracking
  • Landmark Extraction: 68-point facial landmark detection
  • Mouth Region Focus: Specialized cropping for optimal lip reading
  • TensorFlow Integration: Production-ready ML model pipeline

๐ŸŽจ User Experience

  • Glass Morphism UI: Modern, elegant interface design
  • Responsive Design: Works seamlessly on desktop and mobile
  • Real-time Feedback: Live canvas-based face detection visualization
  • Text-to-Speech: Convert predictions to audio using Web Speech API

๐Ÿ› ๏ธ Technology Stack

Frontend Arsenal

React 18          โ†’ Modern component architecture
TypeScript        โ†’ Type safety and better DX
Vite              โ†’ Lightning-fast development
TailwindCSS       โ†’ Utility-first styling
shadcn/ui         โ†’ High-quality component library
Lucide React      โ†’ Beautiful, consistent icons
React Router      โ†’ Client-side routing

Backend Infrastructure

FastAPI           โ†’ High-performance async API framework
TensorFlow        โ†’ Machine learning model execution
OpenCV            โ†’ Computer vision processing
NumPy             โ†’ Numerical computing
Pydantic          โ†’ Data validation and serialization
Uvicorn           โ†’ ASGI server for production

Development Tools

Bun               โ†’ Fast JavaScript runtime and package manager
ESLint            โ†’ Code quality and consistency
Jupyter Notebook  โ†’ ML experimentation and model training
Docker            โ†’ Containerization for deployment

๐Ÿ“ฆ Quick Start

Prerequisites

Make sure you have these installed:

  • Node.js 18+ and Bun (or npm)
  • Python 3.8+ with pip
  • Modern browser with camera permissions

Frontend Setup

  1. Clone and navigate to project

    git clone <your-repo-url>
    cd LumaVoice
  2. Install dependencies with Bun

    bun install
  3. Start the development server

    bun run dev

    ๐ŸŒ Frontend runs on http://localhost:5173

๐Ÿ”ง Backend Setup

  1. Navigate to backend directory

    cd backend
  2. Create virtual environment

    python -m venv venv
    
    # Windows
    venv\Scripts\activate
    
    # macOS/Linux
    source venv/bin/activate
  3. Install Python dependencies

    pip install fastapi uvicorn python-multipart
    pip install tensorflow opencv-python numpy pillow
    pip install aiofiles python-jose[cryptography]
  4. Launch FastAPI server

    uvicorn app:app --reload --host 0.0.0.0 --port 8000

    ๐Ÿš€ Backend API runs on http://localhost:8000 ๐Ÿ“– Interactive docs at http://localhost:8000/docs

๐Ÿณ Docker Deployment (Optional)

# Build the container
docker build -t lumavoice .

# Run the application
docker run -p 3000:3000 -p 8000:8000 lumavoice

๐ŸŽฎ How to Use LumaVoice

Step 1: Choose Your Input Method

  • ๐Ÿ“ Upload Video: Drag and drop or select video files (up to 100MB)
  • ๐Ÿ“น Record Live: Use your webcam to record real-time footage
  • ๐ŸŽฌ Test Videos: Select from pre-loaded sample videos

Step 2: AI Processing

  • Click "Predict Speech" to analyze the video
  • Watch the real-time face detection visualization
  • AI processes lip movements and facial landmarks

Step 3: Get Results

  • View the predicted text output
  • See confidence scores for accuracy assessment
  • Use Text-to-Speech to hear the predicted words

Step 4: Advanced Features

  • Switch between light/dark themes
  • Access prediction history
  • Download results for future reference

๐Ÿ”Œ API Reference

Core Endpoints

POST /predict

Process video for lip reading analysis

Request:

curl -X POST "http://localhost:8000/predict" \
  -F "video=@your-video.mp4"

Response:

{
  "prediction": "Hello, how are you doing today?",
  "confidence": 0.87,
  "status": "success",
  "processing_time": 2.34
}

GET /test-videos

Retrieve available test videos

Response:

{
  "videos": [
    {
      "name": "Sample 1",
      "path": "/static/test1.mp4",
      "duration": "00:05"
    }
  ]
}

GET /health

Service health check

Response:

{
  "status": "healthy",
  "service": "LumaVoice API",
  "version": "1.0.0"
}

๐Ÿงช Machine Learning Pipeline

Our ML pipeline handles the complete video-to-text transformation:

  1. Video Preprocessing: Frame extraction and normalization
  2. Face Detection: Using OpenCV's Haar cascades or DNN models
  3. Landmark Detection: 68-point facial landmark identification
  4. Mouth Region Extraction: Cropping and aligning mouth area
  5. Feature Engineering: Converting visual data to model inputs
  6. Prediction: TensorFlow model inference
  7. Post-processing: Text generation and confidence scoring

Training Data

The model is trained on diverse datasets including:

  • Multi-speaker lip reading datasets
  • Various lighting conditions
  • Different languages and accents
  • Multiple camera angles and resolutions

๐Ÿ—๏ธ Project Structure

LumaVoice/
โ”œโ”€โ”€ ๐Ÿ“ src/                    # Frontend React application
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ components/         # Reusable UI components
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ pages/             # Main application pages
โ”‚   โ”œโ”€โ”€ ๐Ÿ“ lib/               # Utilities and helpers
โ”‚   โ””โ”€โ”€ ๐Ÿ“ hooks/             # Custom React hooks
โ”œโ”€โ”€ ๐Ÿ“ backend/               # FastAPI backend service
โ”‚   โ”œโ”€โ”€ app.py               # Main FastAPI application
โ”‚   โ”œโ”€โ”€ model_loader.py      # ML model management
โ”‚   โ”œโ”€โ”€ video_preprocessor.py # Video processing pipeline
โ”‚   โ””โ”€โ”€ ๐Ÿ“ uploads/          # Temporary file storage
โ”œโ”€โ”€ ๐Ÿ“ public/               # Static assets
โ”œโ”€โ”€ LumaVoice.ipynb         # ML training notebook
โ”œโ”€โ”€ ๐Ÿ“„ Dockerfile.txt       # Container configuration
โ””โ”€โ”€ ๐Ÿ“„ package.json         # Frontend dependencies

๐ŸŽจ Design Philosophy

LumaVoice embraces accessibility-first design with:

  • High Contrast: Ensures visibility for users with visual impairments
  • Keyboard Navigation: Full functionality without mouse interaction
  • Screen Reader Support: Semantic HTML and ARIA labels
  • Mobile Responsive: Touch-friendly interface for all devices
  • Glass Morphism: Modern, elegant visual aesthetic

๐Ÿ”ง Development Guidelines

Frontend Development

# Install new dependencies
bun add package-name

# Run type checking
bun run type-check

# Build for production
bun run build

# Preview production build
bun run preview

Backend Development

# Run with auto-reload
uvicorn app:app --reload

# Run tests
pytest

# Format code
black . && isort .

# Type checking
mypy app.py

๐ŸŒ Browser Support

Browser Status Notes
Chrome 90+ โœ… Full Support Recommended browser
Firefox 88+ โœ… Full Support Excellent performance
Safari 14+ โœ… Full Support iOS 14.3+ required
Edge 90+ โœ… Full Support Chromium-based

๐Ÿค Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin amazing-feature
  5. Open a Pull Request

Development Setup

# Install frontend dependencies
bun install

# Install backend dependencies
cd backend && pip install -r requirements.txt

# Install pre-commit hooks
pre-commit install

๐Ÿ“ˆ Performance Metrics

  • Processing Speed: ~2-5 seconds per 10-second video
  • Accuracy: 85%+ on clear, frontal face videos
  • Model Size: ~50MB compressed TensorFlow model
  • Memory Usage: ~200MB peak during inference

๐Ÿ›ฃ๏ธ Roadmap

Version 2.0 (Coming Soon)

  • Multi-language Support: Spanish, French, German
  • Real-time Streaming: Live webcam lip reading
  • Voice Cloning: Personalized speech synthesis
  • Mobile App: Native iOS and Android applications

Version 2.1 (Future)

  • Batch Processing: Multiple video analysis
  • API Rate Limiting: Production-grade throttling
  • User Authentication: Personal accounts and history
  • Cloud Deployment: AWS/Azure integration

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • TensorFlow Team for the amazing ML framework
  • shadcn/ui for beautiful, accessible components
  • FastAPI for the incredible async framework
  • The Deaf Community for inspiring this project

Built with โค๏ธ by Poras Nagar and Arjun Phogat

Report Bug โ€ข Request Feature โ€ข Documentation

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages