An intelligent AI-powered lecture assistant that helps students understand, summarize, and interact with lecture content through audio transcription, image text extraction, and conversational AI.
- Audio Transcription: Convert lecture audio (MP3) to text using Google Cloud Speech API
- Image Text Extraction: Extract text from lecture notes images using Google Cloud Vision API
- AI Chat Assistant: Interactive chatbot powered by Google Gemini for answering questions about lecture content
- Lecture Summarization: Automatic generation of comprehensive lecture summaries
- Study Notes Creation: AI-generated study notes with key concepts and definitions
- Modern UI: ChatGPT-like interface built with Streamlit
The AI assistant can help you with:
- 📝 Summarizing lecture content from audio and images
- 🔍 Breaking down complex topics into digestible points
- 📚 Creating study notes with key concepts and definitions
- ❓ Answering questions about lecture material
- 💡 Providing examples to illustrate concepts
- 🏷️ Highlighting important terms and relationships
- 📋 Suggesting potential exam questions
- 📅 Helping create study plans
- Python 3.8+
- Google Cloud Account with enabled APIs:
- Google Cloud Speech-to-Text API
- Google Cloud Vision API
- Google AI Studio Account for Gemini API access
-
Clone the repository
git clone https://github.com/ruheil/GenAIProject.git cd lecturemate -
Install dependencies
pip install streamlit google-cloud-vision google-cloud-speech google-generativeai
-
Set up Google Cloud credentials
- Create a service account in Google Cloud Console
- Download the JSON credentials file
- Set the environment variable:
export GOOGLE_APPLICATION_CREDENTIALS="path/to/your/credentials.json"
-
Configure Google Gemini API
- Get your API key from Google AI Studio
- Replace the API key in
main.py:genai.configure(api_key="YOUR_GEMINI_API_KEY_HERE")
-
Start the application
streamlit run main.py
-
Upload lecture materials
- Use the sidebar to upload lecture audio (MP3 format)
- Upload images of lecture notes (JPG, JPEG, PNG)
-
Process uploads
- Click "Process Uploads" to transcribe audio and extract text from images
- The AI will automatically generate an initial lecture summary
-
Chat with the AI
- Ask questions about the lecture content
- Request specific summaries or explanations
- Get study notes and key concepts
Create a requirements.txt file with the following dependencies:
streamlit>=1.28.0
google-cloud-vision>=3.4.0
google-cloud-speech>=2.21.0
google-generativeai>=0.3.0
# Google Cloud credentials
export GOOGLE_APPLICATION_CREDENTIALS="path/to/credentials.json"
# Optional: Set specific project ID
export GOOGLE_CLOUD_PROJECT="your-project-id"Make sure to replace the hardcoded API key in main.py with your actual Gemini API key:
genai.configure(api_key="YOUR_ACTUAL_API_KEY")For production, consider using environment variables:
import os
genai.configure(api_key=os.getenv("GEMINI_API_KEY"))- Supports MP3 format
- Automatic punctuation
- English language support (configurable)
- Real-time transcription feedback
- Document text detection
- Support for handwritten and printed text
- Multiple image formats supported
- Context-aware responses
- Lecture material integration
- Educational tone and formatting
- Conversation history maintenance