abaja's picture
|
download
raw
9.17 kB
metadata
title: Academic Notes Assistant
emoji: ๐ŸŽ“
colorFrom: indigo
colorTo: purple
sdk: docker
pinned: false
app_port: 7860

๐ŸŽ“ Autonomous Academic Lecture & Notes Assistant

Production-ready, local-first & cloud-deployable AI study copilot for graduate-level STEM coursework.

Python Google Gemini Streamlit Telegram Obsidian License: MIT


๐Ÿ“Œ Overview

The Autonomous Academic Lecture Assistant automates the entire lifecycle of lecture ingestion, transcription, structured academic synthesis, LaTeX mathematical derivation, exam preparation, and cross-device synchronization:

               โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
               โ”‚    Audio Recording / PDF / Slides / Word     โ”‚
               โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                      โ”‚
           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
           โ–ผ                          โ–ผ                          โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ“ ./incoming_audio โ”‚    โ”‚ ๐Ÿค– Telegram Bot     โ”‚    โ”‚ ๐Ÿ’ป Streamlit Web UI โ”‚
โ”‚ (Watcher Daemon)    โ”‚    โ”‚ (@note_taker_bot)   โ”‚    โ”‚ (Direct Upload)     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
           โ”‚                          โ”‚                          โ”‚
           โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                      โ–ผ
                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                      โ”‚    Gemini Flash Engine       โ”‚
                      โ”‚ (Auto-fallback Architecture) โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚ Generates structured Markdown & LaTeX
                                     โ–ผ
                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                      โ”‚   ๐Ÿ“š Obsidian Vault Vault    โ”‚
                      โ”‚      (./lectures/*.md)       โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                     โ”‚
           โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
           โ–ผ                                                   โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”             โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚    Obsidian on Your Mac     โ”‚             โ”‚        GitHub Vault Repository      โ”‚
โ”‚  (Auto-sync via Git Engine) โ”‚             โ”‚  (my-obsidian-notes.git)            โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜             โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โœจ Key Features

  • Multi-Format Ingestion: Supports .m4a, .mp3, .wav, .aac, .ogg, .flac, .pdf, .docx, .doc, .pptx, .ppt, .txt, .md, and Live Browser Mic.
  • Tiered Model Routing: Routes audio and dense math proofs to gemini-3.6-flash and typed slides/docs to ultra-fast gemini-3.1-flash-lite.
  • Obsidian Native Integration: Automatically attaches YAML frontmatter, [[Wikilinks]], #course/... tags, and > [!WARNING] callouts.
  • Obsidian Maps of Content (MOC): Auto-compiles chronological syllabus tables, master theorem indexes, and exam pitfalls.
  • Anki Flashcard Deck Exporter: Auto-compiles native .apkg flashcard decks for spaced repetition.
  • Semester-Wide ChromaDB Vector Search: Semantic RAG queries across all past course notes and proofs.
  • Automated Git Sync Engine: Commits and pushes notes to your remote GitHub vault automatically.
  • Streamlit Web Dashboard:
    • Live in-browser microphone recording.
    • Multi-subject daily briefings.
    • Date-filtered syllabus exam tutor & semester semantic search.
  • Asynchronous Telegram Bot:
    • Send audio/PDFs on-the-go.
    • Interactive /menu button interface.
    • Export Anki decks directly to mobile via /anki.
    • Semantic vector search via /search.
    • High-res LaTeX math image rendering via /latex.

๐Ÿ“ Repository Structure

.
โ”œโ”€โ”€ .github/workflows/         # CI/CD auto-sync workflow for Hugging Face Spaces
โ”œโ”€โ”€ .env.example               # Environment variables configuration template
โ”œโ”€โ”€ .gitignore                 # Standard Python, Obsidian, and IDE ignore rules
โ”œโ”€โ”€ Dockerfile                 # Container image specification (UID 1000, Port 7860)
โ”œโ”€โ”€ LICENSE                    # MIT License
โ”œโ”€โ”€ README.md                  # Project documentation with HF Spaces metadata
โ”œโ”€โ”€ anki_exporter.py           # Anki .apkg deck generation engine
โ”œโ”€โ”€ app.py                     # Streamlit web dashboard with mic & password gate
โ”œโ”€โ”€ audio_optimizer.py         # 32kbps mono AAC audio compressor
โ”œโ”€โ”€ bot.py                     # Telegram bot service
โ”œโ”€โ”€ core_engine.py             # Shared reasoning, date filtering, and LaTeX repair
โ”œโ”€โ”€ docker-compose.yml         # Container orchestration configuration
โ”œโ”€โ”€ git_sync.py                # Automated Git synchronization engine
โ”œโ”€โ”€ incoming_audio/            # Watched folder for recordings/documents
โ”œโ”€โ”€ ingest_audio.py            # Universal audio and document ingestion pipeline
โ”œโ”€โ”€ lectures/                  # Generated structured Markdown study notes
โ”œโ”€โ”€ main.py                    # Unified launcher with startup vault hydration & GC
โ”œโ”€โ”€ metadata_db.py             # Offline SQLite metadata database
โ”œโ”€โ”€ requirements.txt           # Pinned project dependencies
โ”œโ”€โ”€ vector_store.py            # ChromaDB vector store & semantic search
โ””โ”€โ”€ watcher.py                 # File system watcher daemon

๐Ÿ› ๏ธ Quick Start (Local Setup)

1. Clone & Setup Virtual Environment

git clone https://github.com/AkhilBaja3005/notes-taker.git
cd notes-taker

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. Configure .env

Copy .env.example to .env and fill in your credentials:

cp .env.example .env
GEMINI_API_KEY=your_gemini_api_key_here
AUDIO_MODEL=gemini-3.6-flash
DOC_MODEL=gemini-3.1-flash-lite
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
ALLOWED_TELEGRAM_USER_IDS=
WATCH_DIR=./incoming_audio
LECTURES_DIR=./lectures

# Obsidian Git Sync Configuration
ENABLE_GIT_SYNC=true
GIT_VAULT_REPO_URL=https://<GITHUB_PAT>@github.com/yourusername/my-obsidian-notes.git
GIT_BRANCH=main
STREAMLIT_PASSWORD=

3. Launch All Services

python main.py

๐Ÿค— Hugging Face Spaces Deployment

Space URL: https://huggingface.co/spaces/abaja/notes-taker

In your Hugging Face Space settings, add the following secrets:

  • GEMINI_API_KEY: Your Gemini API Key
  • TELEGRAM_BOT_TOKEN: Your Telegram Bot Token (from @BotFather)
  • GIT_VAULT_REPO_URL: https://<GITHUB_PAT>@github.com/yourusername/my-obsidian-notes.git
  • ENABLE_GIT_SYNC: true
  • STREAMLIT_PASSWORD: (Optional password gate)

๐Ÿ“„ License

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

Xet Storage Details

Size:
9.17 kB
ยท
Xet hash:
83a7f83795d089eb7be3962e5c56039c68344d85e59953507e93e1b312307334

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.