KlassRoom helps students turn lecture audio into actionable study aids:
- Transcript generation from uploaded audio
- Keyword/entity extraction using Google Cloud Natural Language
- Curated YouTube video suggestions based on extracted topics
- Optional email delivery of the transcript, topics, and links
The app is a simple Flask web application with classic HTML/CSS/JS templates.
- Speech-to-text from WAV audio uploads using
SpeechRecognition - Entity extraction via
google-cloud-language - YouTube suggestions scraped from search results
- Email summaries via Gmail SMTP (optional)
app.py: Flask app, routes, and server bootstrapGoogleNLPAPI.py: Google Cloud Language client and entity extractionemailAnalysis.py: Email composer/sender (SMTP)emailer.py: Minimal email sender (not used by default routes)getYoutubeVideoLinks.py: YouTube search scraping to build embed linkstemplates/: HTML templatesstatic/: CSS, JS, and assets
- Python 3.10+ (macOS recommended; tested locally)
- A Google Cloud project with the Natural Language API enabled
- A service account key JSON file downloaded from Google Cloud Console
- Save the key file as
googleNLPAPIcodes.jsonin the project root - The app sets
GOOGLE_APPLICATION_CREDENTIALSto this filename at runtime
- Save the key file as
- Optional: Gmail account with an App Password (for email sending)
- If you plan to use email, configure the sender and password before sending
- Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip- Install dependencies
pip install Flask google-cloud-language SpeechRecognition- Put your Google Cloud key in place
- Copy your service account JSON into the project root as:
googleNLPAPIcodes.json
- Run the app
python app.pyThen open http://127.0.0.1:5000/
The route that emails summaries uses Gmail SMTP. Before using it in production:
- In
emailAnalysis.py, the SMTP sender email must be a valid Gmail address - Use a Gmail App Password for the SMTP login
- Some routes in
app.pycurrently pass placeholder credentials for demo purposes; you should wire your own secure values before using email in a real environment
- Audio uploads should be WAV/PCM for best results with
SpeechRecognition - If you see certificate/SSL issues on macOS when scraping YouTube, run Apple’s “Install Certificates.command” bundled with your Python or install certificates via Homebrew
- If you get Google credentials errors at runtime, ensure
googleNLPAPIcodes.jsonexists in the project root and is a valid service account key with access to the Natural Language API - YouTube search scraping is best-effort and may change if YouTube alters its markup
- Google Cloud auth error:
- Ensure
googleNLPAPIcodes.jsonexists at the project root and is a valid key
- Ensure
- Flask server starts but analysis fails:
- Confirm you installed:
Flask google-cloud-language SpeechRecognition
- Confirm you installed:
- SSL / certificate errors on macOS:
- Install/update system certificates or run the Python “Install Certificates.command”
- Email fails to send:
- Use a Gmail App Password and correct sender/recipient addresses
This project is provided as-is for educational purposes.