Skip to content
Golden007-progPublic

About

Omni-Lab is a multimodal learning platform that combines real-time voice interaction with autonomous code execution. It solves the "hallucination problem" in AI tutoring by verifying scientific concepts through live simulation.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

9 Commits

Folders and files

Repository files navigation

๐Ÿงช Omni-Lab: The Empirical Tutor

A multimodal AI learning platform that transforms static content into interactive, verifiable, and visual lessons. Omni Lab

React TypeScript Vite Gemini License

๐ŸŒ Live Demo ยท ๐Ÿ“– DevPost ยท ๐Ÿ› Report Bug


๐Ÿ“ธ Screenshots

Landing Page Upload a PDF
Landing Page Upload PDF
Generated Slides Auto-Explain in Action
Generated Slides Auto Explaining

๐Ÿ’ก Inspiration

We live in an era of information abundance but "explanation poverty." Students stare at static PDFs and textbooks, struggling to visualize complex concepts. Standard chatbots can answer questions, but they tell without showingโ€”and they can hallucinate facts without verification.

We wanted to build a tutor that acts like a lab partner:

  1. ๐Ÿ” See what you are reading.
  2. ๐Ÿ“ Prove concepts through math and simulation (Empirical).
  3. ๐ŸŽจ Visualize abstract ideas on the fly.

Omni-Lab was born from the idea that AI should be more than a text generatorโ€”it should be an active participant in the scientific method of learning.


๐Ÿš€ What It Does

Omni-Lab is an autonomous educational workspace powered by three specialized AI Agents:

Agent Model Role
๐ŸŽ“ The Teacher Gemini 2.5 Flash (Native Audio) Real-time voice conversation, slide narration, Q&A
๐Ÿ”ฌ The Scientist Gemini 3 Pro Analytical verification, code generation, live simulations
๐ŸŽจ The Visualizer Gemini 3 Flash Document โ†’ slides, flashcards, quizzes, infographics

โœจ Key Features

๐Ÿ“„ Auto-Lecture Generation

Upload any PDF and the system generates a full slide deck, then delivers a live voice-narrated presentation automatically.

Click Play to Auto-Explain AI Teaching Live
Click Play Auto Explaining

๐ŸŽค Live Voice Tutor

Ask questions by voice โ€” the AI Teacher listens, understands your slides' context, and responds naturally. Supports real-time interruptions with local VAD (Voice Activity Detection).

Listening to Your Question Answered via Voice
Listening Voice Answer

๐Ÿ’ฌ Chat Explanations

Prefer text? Ask in the chat panel and receive detailed, contextual explanations alongside your slides.

Chat Explanation Answer Detail
Chat Explain Answer

๐Ÿƒ Flashcards & Quizzes

Auto-generate study materials from your content. Test yourself with interactive quizzes and review key concepts with flashcards.

Generating Flashcards Flashcards View Quiz View Submit & Grade
Generating Flashcards Quiz Submit

๐Ÿ“Š Reports, Infographics & Data Tables

Generate comprehensive reports, visual infographics, and structured data tables from any topic.

Report Infographic Data Table
Report Infographic Data Table

๐ŸŽฌ AI Video Generation

Ask "Make a video about this" and the system uses Veo to generate educational video clips on demand.

Video Structure Generated Video
Video Structure Generated Video

๐Ÿ—‚๏ธ Workspace Tabs

Switch between Slides, Flashcards, Quiz, Infographic, and Mind Map views without losing context.

Workspace Tabs


๐Ÿ—๏ธ Architecture

graph TB
    subgraph Client["๐Ÿ–ฅ๏ธ React 19 SPA (Vite + TypeScript)"]
        UI[UI Components]
        VAD[Local VAD]
        Orchestrator[Marathon Loop Orchestrator]
    end

    subgraph Agents["๐Ÿค– AI Agents"]
        Teacher["๐ŸŽ“ Teacher<br/>gemini-2.5-flash-native-audio"]
        Scientist["๐Ÿ”ฌ Scientist<br/>gemini-3-pro-preview"]
        Visualizer["๐ŸŽจ Visualizer<br/>gemini-3-flash-preview"]
    end

    subgraph Media["๐Ÿ–ผ๏ธ Media Generation"]
        Imagen["Imagen<br/>gemini-2.5-flash-image"]
        Veo["Veo<br/>veo-3.1-fast-generate"]
    end

    UI --> Orchestrator
    VAD --> Teacher
    Orchestrator --> Teacher
    Orchestrator --> Scientist
    Orchestrator --> Visualizer
    Visualizer --> Imagen
    Visualizer --> Veo
    Scientist --> |Recharts| UI
Loading

How It Works

  1. Upload a PDF or enter a topic
  2. Marathon Loop analyzes intent and routes to the right agent
  3. Teacher narrates via WebSocket audio streaming
  4. Scientist generates Python code โ†’ renders live charts via Recharts
  5. Visualizer creates structured content (slides, flashcards, quizzes) and media (images, videos)

โš™๏ธ Tech Stack

Layer Technology
Framework React 19, TypeScript, Vite 6
Styling Tailwind CSS
AI Core Google Gemini API (@google/genai)
Voice WebSocket + Native Audio (Gemini 2.5 Flash)
Charts Recharts
Export PptxGenJS, html2pdf.js, FileSaver
Deployment GitHub Pages

๐Ÿšง Challenges We Ran Into

  • ๐ŸŽค Voice Interruptions ("Barge-in"): Stopping playback and clearing the audio buffer instantly when the user interrupts, using client-side VAD to prevent the AI from hearing its own output.
  • ๐Ÿ”„ Multimodal State Sync: Keeping the visual state (current slide) synchronized with the audio state (what the model is saying) through a complex AutoTutorContext state machine.
  • ๐Ÿ“‹ Structured Output: Ensuring consistent JSON from LLMs for quizzes, slides, and flashcards using Gemini's responseSchema and focused system instructions.

๐Ÿ† Accomplishments

  • โœ… Auto-Explain Magic โ€” Upload โ†’ Slide Generation โ†’ Voice Presentation, fully automated
  • โœ… Veo Integration โ€” On-demand educational video generation pipeline
  • โœ… Scientist Agent โ€” AI writes code to prove a point, not just hallucinate answers
  • โœ… Natural Voice Interaction โ€” Real-time, interruptible voice conversation

๐Ÿ“š What We Learned

  • Gemini 2.5 Flash native audio modality feels significantly more natural than stitching together STT + TTS services
  • Agent Specialization โ€” Splitting into Teacher, Scientist, and Visualizer yields dramatically better responses than a single-prompt approach

๐Ÿ”ฎ What's Next

  • ๐Ÿ Real Python Runtime โ€” Integrate Pyodide (WebAssembly) to execute Scientist-generated code in-browser
  • ๐Ÿ‘ฅ Collaborative Classrooms โ€” Multi-user lecture rooms
  • ๐Ÿฅฝ AR Mode โ€” Project visual overlays into 3D space using WebXR

๐Ÿ› ๏ธ Run Locally

Prerequisites: Node.js v18+

# 1. Clone the repository
git clone https://github.com/Golden007-prog/Omni-Lab.git
cd Omni-Lab

# 2. Install dependencies
npm install

# 3. Configure API Key โ€” create a .env.local file
echo "VITE_GEMINI_API_KEY=your_api_key_here" > .env.local
# Get your key from https://aistudio.google.com/

# 4. Start the dev server
npm run dev

๐Ÿค Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request.

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

Built with โค๏ธ using Google Gemini

โญ Star this repo if you found it useful!

About

Omni-Lab is a multimodal learning platform that combines real-time voice interaction with autonomous code execution. It solves the "hallucination problem" in AI tutoring by verifying scientific concepts through live simulation.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages